mirror of
https://github.com/johannesjo/super-productivity.git
synced 2026-07-18 00:46:45 +00:00
feat(supersync): add preview deployments to default CORS origins
This commit is contained in:
parent
be26d6de05
commit
aa55c0475b
1 changed files with 7 additions and 3 deletions
|
|
@ -93,10 +93,14 @@ export interface ServerConfig {
|
|||
|
||||
/**
|
||||
* Default CORS origins for production security.
|
||||
* Only allows the official Super Productivity app.
|
||||
* Use CORS_ORIGINS env var to add development origins (e.g., localhost).
|
||||
* - Production app: exact match
|
||||
* - Preview deployments: wildcard subdomain pattern
|
||||
* Use CORS_ORIGINS env var to add additional origins.
|
||||
*/
|
||||
const DEFAULT_CORS_ORIGINS: CorsOrigin[] = ['https://app.super-productivity.com'];
|
||||
const DEFAULT_CORS_ORIGINS: CorsOrigin[] = [
|
||||
'https://app.super-productivity.com',
|
||||
/^https:\/\/[^\/]+\.super-productivity-preview\.pages\.dev$/,
|
||||
];
|
||||
|
||||
const DEFAULT_CONFIG: ServerConfig = {
|
||||
port: 1900,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue