Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
@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 126,131 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 66 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
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.