File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change 16
16
# https://docs.djangoproject.com/en/dev/ref/settings/#secret-key
17
17
SECRET_KEY = env ("DJANGO_SECRET_KEY" )
18
18
# https://docs.djangoproject.com/en/dev/ref/settings/#allowed-hosts
19
- ALLOWED_HOSTS = env .list ("DJANGO_ALLOWED_HOSTS" , default = [ "*" ] )
19
+ ALLOWED_HOSTS = env .list ("DJANGO_ALLOWED_HOSTS" )
20
20
21
21
# DATABASES
22
22
# ------------------------------------------------------------------------------
Original file line number Diff line number Diff line change 1
1
[[redirects ]]
2
2
# Serve the api docs from /api/
3
- from = " /api /"
4
- to = " https://api.beluga.insectai.org/ docs/"
3
+ from = " /docs /"
4
+ to = " API_BASE_URL_PLACEHOLDER/ docs/:splat "
5
5
status = 200
6
6
force = true
7
7
headers = { X-From = " Netlify" }
8
8
9
9
[[redirects ]]
10
10
# Serve the external api endpints from /api/*
11
11
from = " /api/*"
12
- to = " https://api.beluga.insectai.org /api/:splat"
12
+ to = " API_BASE_URL_PLACEHOLDER /api/:splat"
13
13
status = 200
14
14
force = true
15
15
headers = { X-From = " Netlify" }
16
16
17
17
[[redirects ]]
18
18
# Serve the external images from from /static/images/*
19
19
from = " /static/captures/*"
20
- to = " https://api.beluga.insectai.org /static/captures/:splat"
20
+ to = " API_BASE_URL_PLACEHOLDER /static/captures/:splat"
21
21
status = 200
22
22
force = true
23
23
headers = { X-From = " Netlify" }
24
24
25
25
[[redirects ]]
26
26
# Serve the external images from from /static/images/*
27
27
from = " /static/crops/*"
28
- to = " https://api.beluga.insectai.org /static/crops/:splat"
28
+ to = " API_BASE_URL_PLACEHOLDER /static/crops/:splat"
29
29
status = 200
30
30
force = true
31
31
headers = { X-From = " Netlify" }
@@ -46,4 +46,5 @@ force = false
46
46
47
47
[build ]
48
48
# Only trigger a build if the frontend code has changed
49
+ command = " sed -i \" s|API_BASE_URL_PLACEHOLDER|${API_BASE_URL}|g\" netlify.toml && cat netlify.toml && yarn build && yarn build-storybook"
49
50
ignore = " git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF ./"
You can’t perform that action at this time.
0 commit comments