mirror of
https://github.com/lifegpc/eh-downloader.git
synced 2026-07-08 01:31:00 +08:00
.
This commit is contained in:
@@ -59,6 +59,7 @@ export async function handler(req: Request, ctx: MiddlewareHandlerContext) {
|
|||||||
const origin = req.headers.get("origin");
|
const origin = req.headers.get("origin");
|
||||||
if (origin) {
|
if (origin) {
|
||||||
headers.set("Access-Control-Allow-Origin", origin);
|
headers.set("Access-Control-Allow-Origin", origin);
|
||||||
|
headers.set("Access-Control-Allow-Credentials", "true");
|
||||||
}
|
}
|
||||||
if (ctx.state.is_from_cookie && ctx.state.token) {
|
if (ctx.state.is_from_cookie && ctx.state.token) {
|
||||||
const m = get_task_manager();
|
const m = get_task_manager();
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ export async function handler(req: Request, ctx: MiddlewareHandlerContext) {
|
|||||||
const origin = req.headers.get("origin");
|
const origin = req.headers.get("origin");
|
||||||
if (origin) {
|
if (origin) {
|
||||||
headers.set("Access-Control-Allow-Origin", origin);
|
headers.set("Access-Control-Allow-Origin", origin);
|
||||||
|
headers.set("Access-Control-Allow-Credentials", "true");
|
||||||
}
|
}
|
||||||
return new Response(res.body, {
|
return new Response(res.body, {
|
||||||
status: res.status,
|
status: res.status,
|
||||||
|
|||||||
Reference in New Issue
Block a user