@@ -6,7 +6,7 @@ describe("same-origin static ownership", () => {
66 it ( "serves explicit deep links with an external-bundle policy and revalidated entry HTML" , async ( ) => {
77 const fetch = vi . fn ( async ( request : Request ) => new Response ( request . method === "HEAD" ? null : "entry" , { headers : { "Content-Type" : "text/html" } } ) ) ;
88 const env = { ASSETS : { fetch } } as unknown as Env ;
9- for ( const path of [ "/" , "/jobs" , "/jobs/new" , "/jobs/id/edit" , "/jobs/id/settings" , "/job-runs" , "/job-runs/id" , "/settings/authorized-clients" , "/auth/verify?token=one-time" , "/authorize?client_id=test" , "/device?user_code=ABCD-2345" ] ) {
9+ for ( const path of [ "/" , "/jobs" , "/jobs/new" , "/jobs/id/edit" , "/jobs/id/settings" , "/projects" , "/projects/new" , "/projects/id" , "/ job-runs", "/job-runs/id" , "/settings/authorized-clients" , "/auth/verify?token=one-time" , "/authorize?client_id=test" , "/device?user_code=ABCD-2345" ] ) {
1010 const response = await staticApp ( new Request ( `https://app.factorize.sh${ path } ` ) , env ) ;
1111 expect ( response ?. status ) . toBe ( 200 ) ;
1212 expect ( response ?. headers . get ( "content-security-policy" ) ) . toBe ( STATIC_CSP ) ;
@@ -21,7 +21,7 @@ describe("same-origin static ownership", () => {
2121 } ) ;
2222 it ( "never forwards backend namespaces, unknown routes or mutations to static hosting" , async ( ) => {
2323 const fetch = vi . fn ( ) ; const env = { ASSETS : { fetch } } as unknown as Env ;
24- for ( const path of [ "/api/v1" , "/api/v1/unknown" , "/api/v1/jobs" , "/oauth/token" , "/auth/linear" , "/auth/github/setup" , "/webhooks/github" , "/internal/missing" , "/mcp" , "/healthz" , "/.well-known/oauth-authorization-server" , "/unknown" , "/assets/subdir/file.js" , "/index.html" , "/jobs/id/edit/extra" , "/jobs/id/settings/extra" , "/jobs/id/unknown" ] ) {
24+ for ( const path of [ "/api/v1" , "/api/v1/unknown" , "/api/v1/jobs" , "/oauth/token" , "/auth/linear" , "/auth/github/setup" , "/webhooks/github" , "/internal/missing" , "/mcp" , "/healthz" , "/.well-known/oauth-authorization-server" , "/unknown" , "/assets/subdir/file.js" , "/index.html" , "/jobs/id/edit/extra" , "/jobs/id/settings/extra" , "/jobs/id/unknown" , "/projects/id/unknown" ] ) {
2525 expect ( await staticApp ( new Request ( `https://app.factorize.sh${ path } ` ) , env ) ) . toBeNull ( ) ;
2626 }
2727 for ( const method of [ "POST" , "PUT" , "DELETE" , "OPTIONS" ] ) for ( const path of [ "/jobs" , "/authorize" , "/device" , "/assets/index-hash.js" , "/auth/login" ] ) expect ( await staticApp ( new Request ( `https://app.factorize.sh${ path } ` , { method } ) , env ) ) . toBeNull ( ) ;
0 commit comments