Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

nuxtjs-drupal-ce

Package Overview
Dependencies
Maintainers
4
Versions
86
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nuxtjs-drupal-ce - npm Package Compare versions

Comparing version
2.5.2
to
2.5.3
+1
-1
dist/module.json

@@ -7,3 +7,3 @@ {

},
"version": "2.5.2",
"version": "2.5.3",
"builder": {

@@ -10,0 +10,0 @@ "@nuxt/module-builder": "1.0.2",

/**
* Sets CORS headers at runtime for component preview paths.
* Sets CORS headers at runtime for component preview requests.
*
* Uses beforeResponse to run for ALL requests including static /_nuxt/ assets,
* ensuring the runtime drupalBaseUrl is used even when it differs from build-time.
* Uses beforeResponse to run for ALL requests including static assets,
* ensuring the runtime drupalBaseUrl is used even when it differs from
* build-time. Only sets headers when the request origin matches the
* Drupal backend, so regular requests are unaffected.
*/
declare const _default: any;
export default _default;

@@ -5,6 +5,2 @@ import { setResponseHeader, getRequestHeader } from "h3";

nitroApp.hooks.hook("beforeResponse", (event) => {
const path = event.path?.split("?")[0] || "";
if (!path.startsWith("/_nuxt/") && !path.startsWith("/nuxt-component-preview/")) {
return;
}
const drupalBaseUrl = useRuntimeConfig().public.drupalCe?.drupalBaseUrl;

@@ -21,3 +17,3 @@ if (!drupalBaseUrl) {

const origin = getRequestHeader(event, "origin");
if (origin && origin !== corsOrigin) {
if (!origin || origin !== corsOrigin) {
return;

@@ -24,0 +20,0 @@ }

{
"name": "nuxtjs-drupal-ce",
"version": "2.5.2",
"version": "2.5.3",
"license": "MIT",

@@ -5,0 +5,0 @@ "bin": {