@@ -14,12 +14,12 @@ describe("API Subdomain Redirect Logic", () => {
1414
1515 describe ( "isApiSubdomainOfConfiguredHost" , ( ) => {
1616 it ( "should detect api subdomain of configured host" , ( ) => {
17- const configuredHost = "pd-nonce.preview. gitpod-dev.com " ;
17+ const configuredHost = "gitpod.io " ;
1818 const testCases = [
19- { hostname : "api.pd-nonce.preview. gitpod-dev.com " , expected : true } ,
20- { hostname : "api.gitpod.io " , expected : false } , // Different configured host
21- { hostname : "pd-nonce.preview. gitpod-dev.com " , expected : false } , // Main domain
22- { hostname : "workspace-123.pd-nonce.preview. gitpod-dev.com " , expected : false } , // Other subdomain
19+ { hostname : "api.gitpod.io " , expected : true } ,
20+ { hostname : "api.preview. gitpod-dev.com " , expected : false } , // Different configured host
21+ { hostname : "gitpod.io " , expected : false } , // Main domain
22+ { hostname : "workspace-123.gitpod.io " , expected : false } , // Other subdomain
2323 { hostname : "api.evil.com" , expected : false } , // Different domain
2424 ] ;
2525
@@ -39,7 +39,7 @@ describe("API Subdomain Redirect Logic", () => {
3939 } ) ;
4040
4141 it ( "should handle preview environment correctly" , ( ) => {
42- const configuredHost = "pd-nonce. preview.gitpod-dev.com" ;
42+ const configuredHost = "preview.gitpod-dev.com" ;
4343 const apiSubdomain = `api.${ configuredHost } ` ;
4444
4545 const result = isApiSubdomainOfConfiguredHost ( apiSubdomain , configuredHost ) ;
@@ -52,20 +52,20 @@ describe("API Subdomain Redirect Logic", () => {
5252 const scenarios = [
5353 {
5454 name : "GitHub OAuth Callback on API Subdomain" ,
55- hostname : "api.pd-nonce.preview. gitpod-dev.com " ,
56- configuredHost : "pd-nonce.preview. gitpod-dev.com " ,
55+ hostname : "api.gitpod.io " ,
56+ configuredHost : "gitpod.io " ,
5757 shouldRedirect : true ,
5858 } ,
5959 {
6060 name : "Regular Login on Main Domain" ,
61- hostname : "pd-nonce.preview. gitpod-dev.com " ,
62- configuredHost : "pd-nonce.preview. gitpod-dev.com " ,
61+ hostname : "gitpod.io " ,
62+ configuredHost : "gitpod.io " ,
6363 shouldRedirect : false ,
6464 } ,
6565 {
6666 name : "Workspace Port (Should Not Redirect)" ,
67- hostname : "3000-pd-nonce.preview. gitpod-dev.com " ,
68- configuredHost : "pd-nonce.preview. gitpod-dev.com " ,
67+ hostname : "3000-gitpod.io " ,
68+ configuredHost : "gitpod.io " ,
6969 shouldRedirect : false ,
7070 } ,
7171 ] ;
0 commit comments