nuxtjs-drupal-ce
Advanced tools
+1
-1
@@ -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 @@ } |
+1
-1
| { | ||
| "name": "nuxtjs-drupal-ce", | ||
| "version": "2.5.2", | ||
| "version": "2.5.3", | ||
| "license": "MIT", | ||
@@ -5,0 +5,0 @@ "bin": { |
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
61478
-0.08%739
-0.27%