Skip to content

Commit 4a81104

Browse files
committed
fix: expose only supported cors methods
1 parent d642f8b commit 4a81104

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/helpers/initialize_app.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ module.exports = function initializeApp() {
9595
};
9696

9797
const { routes } = configuration;
98-
const onlyGetCors = getCors({ allowedMethods: 'GET' });
98+
const onlyGetCors = getCors({ allowMethods: 'GET' });
9999

100100
Object.entries(grants).forEach(([grantType, { handler, parameters }]) => {
101101
const { grantTypeHandlers } = instance(this);
@@ -142,7 +142,7 @@ module.exports = function initializeApp() {
142142

143143
const userinfo = getUserinfo(this);
144144
const userInfoCors = getCors({
145-
allowedMethods: 'GET,POST', exposeHeaders: 'WWW-Authenticate', allowHeaders: 'Authorization',
145+
allowMethods: 'GET,POST', exposeHeaders: 'WWW-Authenticate', allowHeaders: 'Authorization',
146146
});
147147
get('userinfo', routes.userinfo, userInfoCors, error(this, 'userinfo.error'), ...userinfo);
148148
post('userinfo', routes.userinfo, userInfoCors, error(this, 'userinfo.error'), ...userinfo);

0 commit comments

Comments
 (0)