Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

express-prismic

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

express-prismic - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

17

index.js

@@ -21,4 +21,2 @@ var Prismic = require('prismic.io').Prismic,

exports.previewCookie = Prismic.previewCookie;
function prismicWithCTX(ctxPromise, req, res) {

@@ -111,1 +109,16 @@ var self = {

exports.preview = function(req, res) {
prismic.withContext(req,res, function then(ctx) {
var token = req.query['token'];
if (token) {
ctx.api.previewSession(token, ctx.linkResolver, '/', function(err, url) {
res.cookie(Prismic.previewCookie, token, { maxAge: 30 * 60 * 1000, path: '/', httpOnly: false });
res.redirect(301, url);
});
} else {
res.send(400, "Missing token from querystring");
}
});
};

2

package.json
{
"name": "express-prismic",
"description": "Prismic.io support for Prismic.io",
"version": "0.0.2",
"version": "0.0.3",
"license": "Apache-2.0",

@@ -6,0 +6,0 @@ "homepage": "http://github.com/prismicio/express-prismic",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc