Skip to content

Commit

Permalink
BC-7171 - Add NOT_AUTHENTICATED_REDIRECT_URL to environment files and…
Browse files Browse the repository at this point in the history
… update TldrawServerConfig for URL validation
  • Loading branch information
bergatco committed Dec 19, 2024
1 parent 0c13bbc commit c172720
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 3 additions & 1 deletion .env.default
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,6 @@ S3_SSL=false
FEATURE_TLDRAW_ENABLED=true
TLDRAW_WEBSOCKET_URL=ws://localhost:3345

X_API_ALLOWED_KEYS=randomString
X_API_ALLOWED_KEYS=randomString

NOT_AUTHENTICATED_REDIRECT_URL=http://localhost:4000/login
4 changes: 3 additions & 1 deletion .env.test
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,6 @@ FEATURE_TLDRAW_ENABLED=true
TLDRAW_WEBSOCKET_URL=ws://localhost:3399
TLDRAW_WEBSOCKET_PORT=3399

X_API_ALLOWED_KEYS=randomString
X_API_ALLOWED_KEYS=randomString

NOT_AUTHENTICATED_REDIRECT_URL=http://localhost:4000/login
4 changes: 2 additions & 2 deletions src/modules/server/tldraw-server.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ export class TldrawServerConfig {
@IsBoolean()
public FEATURE_TLDRAW_ENABLED!: boolean;

@IsString()
public NOT_AUTHENTICATED_REDIRECT_URL = '/login';
@IsUrl({ protocols: ['https', 'http'], require_tld: false })
public NOT_AUTHENTICATED_REDIRECT_URL!: string;
}

0 comments on commit c172720

Please sign in to comment.