fix(frontend): allow /datamart-builder/api as valid backend base URL
The embedded mode sets VITE_BACKEND_URL=/datamart-builder/api (the nginx proxy path), but the runtime-config policy only allowed /api. This caused resolveBackendUrl() to throw at app startup, resulting in a blank SPA. Add /datamart-builder/api and /datamart-builder/api/ to relativeBases and test cases.
This commit is contained in:
@@ -3,6 +3,8 @@
|
|||||||
{ "value": "/", "valid": true },
|
{ "value": "/", "valid": true },
|
||||||
{ "value": "/api", "valid": true },
|
{ "value": "/api", "valid": true },
|
||||||
{ "value": "/api/", "valid": true },
|
{ "value": "/api/", "valid": true },
|
||||||
|
{ "value": "/datamart-builder/api", "valid": true },
|
||||||
|
{ "value": "/datamart-builder/api/", "valid": true },
|
||||||
{ "value": "http://localhost:8787", "valid": true },
|
{ "value": "http://localhost:8787", "valid": true },
|
||||||
{ "value": "https://api.example.test/v1", "valid": true },
|
{ "value": "https://api.example.test/v1", "valid": true },
|
||||||
{ "value": "https://api.example.test/base/path/", "valid": true },
|
{ "value": "https://api.example.test/base/path/", "valid": true },
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"relativeBases": ["", "/", "/api", "/api/"],
|
"relativeBases": ["", "/", "/api", "/api/", "/datamart-builder/api", "/datamart-builder/api/"],
|
||||||
"absolutePattern": "^https?://(?:\\[[0-9A-Fa-f:.]+\\]|[A-Za-z0-9](?:[A-Za-z0-9.-]*[A-Za-z0-9])?)(?::[0-9]+)?(?:/[^\\s?#]*)?/?$",
|
"absolutePattern": "^https?://(?:\\[[0-9A-Fa-f:.]+\\]|[A-Za-z0-9](?:[A-Za-z0-9.-]*[A-Za-z0-9])?)(?::[0-9]+)?(?:/[^\\s?#]*)?/?$",
|
||||||
"maxPort": 65535,
|
"maxPort": 65535,
|
||||||
"queryAllowed": false,
|
"queryAllowed": false,
|
||||||
|
|||||||
Reference in New Issue
Block a user