We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 27eb558 commit 4549938Copy full SHA for 4549938
cloudformation/main.yml
@@ -849,11 +849,15 @@ Resources:
849
return request;
850
}
851
852
- // Rewrite paths for the SPA, excluding /api and files with extensions
853
- if (!uri.startsWith('/api') && !uri.includes('.')) {
854
- request.uri = '/index.html';
+ // If the URI starts with /api/ and has a trailing slash, or includes a dot (is a file),
+ // let it pass through without modification.
+ // This ensures paths like /api/v1/data or /some/image.png are not rewritten.
855
+ if (uri.startsWith('/api/') || uri.includes('.')) {
856
+ return request;
857
858
859
+ // Rewrite and all other non-file paths to index.html for the SPA.
860
+ request.uri = '/index.html';
861
862
863
0 commit comments