This is to ensure that all Netlify redirects are in a single location and and removing _redirects file. This file was creating a problem between the proxy redirects and the catch-all redirect to index.html
47 lines
1.1 KiB
TOML
47 lines
1.1 KiB
TOML
[[headers]]
|
|
for = "/static/*"
|
|
[header.values]
|
|
cache-control = "max-age=604800"
|
|
|
|
[context.production]
|
|
[context.production.environment]
|
|
REACT_APP_ENVIRONMENT = "PRODUCTION"
|
|
REACT_APP_BASE_URL = "https://api.appsmith.com"
|
|
|
|
[context.release]
|
|
[context.release.environment]
|
|
REACT_APP_ENVIRONMENT = "STAGING"
|
|
REACT_APP_BASE_URL = "https://release-api.appsmith.com"
|
|
|
|
[context.develop]
|
|
[context.develop.environment]
|
|
REACT_APP_ENVIRONMENT = "DEVELOPMENT"
|
|
REACT_APP_BASE_URL = "https://release-api.appsmith.com"
|
|
|
|
[context.a]
|
|
[context.a.environment]
|
|
REACT_APP_ENVIRONMENT = "STAGING"
|
|
REACT_APP_BASE_URL = "https://release-api.appsmith.com"
|
|
|
|
[context.b]
|
|
[context.b.environment]
|
|
REACT_APP_ENVIRONMENT = "STAGING"
|
|
REACT_APP_BASE_URL = "https://release-api.appsmith.com"
|
|
|
|
[[redirects]]
|
|
from = "/api/*"
|
|
to = "API_PLACEHOLDER/api/:splat"
|
|
status = 200
|
|
force = true
|
|
|
|
[[redirects]]
|
|
from = "/oauth2/*"
|
|
to = "API_PLACEHOLDER/oauth2/:splat"
|
|
status = 200
|
|
force = true
|
|
|
|
# This must be the last redirect in the chain because it's a catch-all
|
|
[[redirects]]
|
|
from = "/*"
|
|
to = "/index.html"
|
|
status = 200 |