mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-10 07:12:51 +08:00
feat: add cors origin control into config (#6499)
This commit is contained in:
@@ -15,7 +15,7 @@ module.exports = async (ctx, next) => {
|
||||
logger.info(`${ctx.url}, user IP: ${ctx.ips[0] || ctx.ip}`);
|
||||
ctx.set(headers);
|
||||
ctx.set({
|
||||
'Access-Control-Allow-Origin': `${ctx.host}`,
|
||||
'Access-Control-Allow-Origin': `${config.allowOrigin || ctx.host}`,
|
||||
});
|
||||
|
||||
await next();
|
||||
|
||||
Reference in New Issue
Block a user