-
-
Notifications
You must be signed in to change notification settings - Fork 486
Labels
Description
Environment information
Version: 2.8.5
Platform: Microsoft Windows NT 10.0.26100.0 x64
Node.js version: v20.19.4
Any other relevant information:
What steps will reproduce the bug?
const corsOptions = {
methods: ['OPTIONS', 'GET', 'POST'],
origin: 'https://example.com',
};
-
Requests will respond to any request with
access-control-allow-origin:https://example.com -
If cors options
originis type String,does not check forLine 47 in 9a9a760
} else if (isString(options.origin)) { isOriginAllowedLine 19 in 9a9a760
function isOriginAllowed(origin, allowedOrigin) { -
Is this intended CORS behavior or
access-control-allow-originresponse header should not be sent when origin does not match?