Api: rotacja refresh tokenu + limit na /auth/refresh, dokumentacja i localhost CORS tylko poza produkcja

This commit is contained in:
tisachi
2026-10-11 15:53:01 +02:00
parent 2fb288e029
commit c5c6583a2d
5 changed files with 28 additions and 12 deletions

View File

@@ -21,7 +21,9 @@ export const config = {
/^https?:\/\/(www\.)?domena\.pl(:\d+)?$/,
/^https?:\/\/admin\.domena\.pl(:\d+)?$/,
/^https?:\/\/(www\.)?tisachi\.ddns\.net(:\d+)?$/,
/^https?:\/\/localhost(:\d+)?$/,
/^https?:\/\/127\.0\.0\.1(:\d+)?$/,
// localhost tylko poza produkcją (dev/testy e2e); w produkcji originy wyłącznie znad domeny
...(process.env.NODE_ENV === 'production'
? []
: [/^https?:\/\/localhost(:\d+)?$/, /^https?:\/\/127\.0\.0\.1(:\d+)?$/]),
],
};