Website Structure
This commit is contained in:
parent
62812f2090
commit
71f0676a62
22365 changed files with 4265753 additions and 791 deletions
31
Frontend-Learner/node_modules/nitropack/dist/presets/azure/runtime/azure-swa.mjs
generated
vendored
Normal file
31
Frontend-Learner/node_modules/nitropack/dist/presets/azure/runtime/azure-swa.mjs
generated
vendored
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
import "#nitro-internal-pollyfills";
|
||||
import { useNitroApp } from "nitropack/runtime";
|
||||
import {
|
||||
getAzureParsedCookiesFromHeaders,
|
||||
normalizeLambdaOutgoingHeaders
|
||||
} from "nitropack/runtime/internal";
|
||||
import { parseURL } from "ufo";
|
||||
const nitroApp = useNitroApp();
|
||||
export async function handle(context, req) {
|
||||
let url;
|
||||
if (req.headers["x-ms-original-url"]) {
|
||||
const parsedURL = parseURL(req.headers["x-ms-original-url"]);
|
||||
url = parsedURL.pathname + parsedURL.search;
|
||||
} else {
|
||||
url = "/api/" + (req.params.url || "");
|
||||
}
|
||||
const { body, status, headers } = await nitroApp.localCall({
|
||||
url,
|
||||
headers: req.headers,
|
||||
method: req.method || void 0,
|
||||
// https://github.com/Azure/azure-functions-nodejs-worker/issues/294
|
||||
// https://github.com/Azure/azure-functions-host/issues/293
|
||||
body: req.bufferBody ?? req.rawBody
|
||||
});
|
||||
context.res = {
|
||||
status,
|
||||
cookies: getAzureParsedCookiesFromHeaders(headers),
|
||||
headers: normalizeLambdaOutgoingHeaders(headers, true),
|
||||
body
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue