Website Structure
This commit is contained in:
parent
62812f2090
commit
71f0676a62
22365 changed files with 4265753 additions and 791 deletions
25
Frontend-Learner/node_modules/nitropack/dist/presets/netlify/runtime/netlify-edge.mjs
generated
vendored
Normal file
25
Frontend-Learner/node_modules/nitropack/dist/presets/netlify/runtime/netlify-edge.mjs
generated
vendored
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
import "#nitro-internal-pollyfills";
|
||||
import { useNitroApp } from "nitropack/runtime";
|
||||
import { isPublicAssetURL } from "#nitro-internal-virtual/public-assets";
|
||||
const nitroApp = useNitroApp();
|
||||
export default async function netlifyEdge(request, _context) {
|
||||
const url = new URL(request.url);
|
||||
if (isPublicAssetURL(url.pathname)) {
|
||||
return;
|
||||
}
|
||||
if (!request.headers.has("x-forwarded-proto") && url.protocol === "https:") {
|
||||
request.headers.set("x-forwarded-proto", "https");
|
||||
}
|
||||
let body;
|
||||
if (request.body) {
|
||||
body = await request.arrayBuffer();
|
||||
}
|
||||
return nitroApp.localFetch(url.pathname + url.search, {
|
||||
host: url.hostname,
|
||||
protocol: url.protocol,
|
||||
headers: request.headers,
|
||||
method: request.method,
|
||||
redirect: request.redirect,
|
||||
body
|
||||
});
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue