mirror of
https://github.com/logto-io/logto.git
synced 2025-01-06 20:40:08 -05:00
refactor(console): add dev origin to allowed CORS domain in OIDC (#397)
This commit is contained in:
parent
305b6aefb9
commit
bfc8a64c44
1 changed files with 3 additions and 1 deletions
|
@ -91,7 +91,9 @@ export default async function initOidc(app: Koa): Promise<Provider> {
|
|||
clientBasedCORS: (_, origin) => {
|
||||
console.log('origin', origin);
|
||||
|
||||
return origin.startsWith('http://localhost:3001');
|
||||
return ['http://localhost:3001', 'https://logto.dev'].some((value) =>
|
||||
origin.startsWith(value)
|
||||
);
|
||||
},
|
||||
findAccount: async (ctx, sub) => {
|
||||
await findUserById(sub);
|
||||
|
|
Loading…
Reference in a new issue