From 33cafd6f68e6f2012d6f771e94cb829db223f1a6 Mon Sep 17 00:00:00 2001 From: takoring Date: Wed, 12 Feb 2025 14:15:17 +0900 Subject: [PATCH] fix(example): csrf ignore authorization path --- example/nodejs/src/config/development.ts | 6 +++++- example/nodejs/src/config/local.ts | 7 ++++++- example/nodejs/src/config/production.ts | 6 +++++- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/example/nodejs/src/config/development.ts b/example/nodejs/src/config/development.ts index 2327f1b6f..56dd1ab84 100644 --- a/example/nodejs/src/config/development.ts +++ b/example/nodejs/src/config/development.ts @@ -42,7 +42,11 @@ export const get = (): Config => { 'https://viron.work', 'https://snapshot.viron.work', ], - ignorePaths: ['/ping'], + ignorePaths: [ + '/ping', + '/oidc/authorization', + '/oauth2/google/authorization', + ], }, auth: { jwt: { diff --git a/example/nodejs/src/config/local.ts b/example/nodejs/src/config/local.ts index d3de6b38a..4e865e7d1 100644 --- a/example/nodejs/src/config/local.ts +++ b/example/nodejs/src/config/local.ts @@ -52,8 +52,13 @@ export const get = (mode: Mode): Config => { 'https://localhost:8000', 'https://viron.work', 'https://snapshot.viron.work', + 'https://viron.work:8000', + ], + ignorePaths: [ + '/ping', + '/oidc/authorization', + '/oauth2/google/authorization', ], - ignorePaths: ['/ping'], }, auth: { jwt: { diff --git a/example/nodejs/src/config/production.ts b/example/nodejs/src/config/production.ts index d9ce324a8..ac0992245 100644 --- a/example/nodejs/src/config/production.ts +++ b/example/nodejs/src/config/production.ts @@ -34,7 +34,11 @@ export const get = (): Config => { csrf: { host: 'demo.viron.plus', allowOrigins: ['https://viron.plus', 'https://snapshot.viron.plus'], - ignorePaths: ['/ping'], + ignorePaths: [ + '/ping', + '/oidc/authorization', + '/oauth2/google/authorization', + ], }, auth: { jwt: {