Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
@sanity/preview-url-secret
Advanced tools
[![npm stat](https://img.shields.io/npm/dm/@sanity/preview-url-secret.svg?style=flat-square)](https://npm-stat.com/charts.html?package=@sanity/preview-url-secret) [![npm version](https://img.shields.io/npm/v/@sanity/preview-url-secret/pink-lizard.svg?styl
Warning
This is an experimental package. Breaking changes may be introduced at any time. It's not production ready.
npm i --save-exact @sanity/preview-url-secret@pink-lizard @sanity/client
TODO how to verify the secret in an API handler that enables Draft Mode
@TODO move to presentation tool docs
import { presentationTool } from '@sanity/presentation'
import { definePreviewUrl } from '@sanity/preview-url-secret/presentation'
import { visionTool } from '@sanity/vision'
import { defineConfig } from 'sanity'
import { deskTool } from 'sanity/desk'
export default defineConfig({
projectId,
dataset,
schema,
plugins: [
presentationTool({
// The URL you usually would pass into `previewUrl`:
// previewUrl: 'http://localhost:3000/en/home',
// You now pass into `definePreviewUrl`, slightly modified:
previewUrl: definePreviewUrl({
// You first specify the shared baseUrl:
origin: 'http://localhost:3000',
preview: '/en/home', // Optional, it's '/' by default
// The API route that securely puts the app in a "Draft Mode"
// Next.js docs: https://nextjs.org/docs/app/building-your-application/configuring/draft-mode
draftMode: {
enable: '/api/draft',
},
}),
}),
deskTool(),
visionTool(),
],
})
FAQs
[![npm stat](https://img.shields.io/npm/dm/@sanity/preview-url-secret.svg?style=flat-square)](https://npm-stat.com/charts.html?package=@sanity/preview-url-secret) [![npm version](https://img.shields.io/npm/v/@sanity/preview-url-secret.svg?style=flat-squar
The npm package @sanity/preview-url-secret receives a total of 181,897 weekly downloads. As such, @sanity/preview-url-secret popularity was classified as popular.
We found that @sanity/preview-url-secret demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 69 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.