-
Notifications
You must be signed in to change notification settings - Fork 66
/
netlify.toml
103 lines (81 loc) · 3.33 KB
/
netlify.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
[Settings]
# ID = "automatically set by Netlify or equal to $NETLIFY_ID_FOR_PRODUCTION when applicable"
[build]
publish = "dist/spa"
command = "yarn build"
functions = "netlify-functions"
# Note that headers and redirects are shared across all deploy contexts
# https://www.netlify.com/docs/netlify-toml-reference/
[[headers]]
for = "/*"
[headers.values]
# Allowing sameorigin for stelace dashboard content live-editor
Content-Security-Policy = "frame-ancestors 'self' stelace.com localhost:*"
X-XSS-Protection = "1; mode=block"
# Only changing this to "all" on production branch (cf. production context below)
X-Robots-Tag = "noindex, nofollow"
# Order of redirects matters
# Serving HTML file
[[redirects]]
from = "/stelace"
to = "https://stelace.com/dashboard"
force = true
status = 200
# All dashboard routes
[[redirects]]
from = "/stelace/*"
to = "https://stelace.com/dashboard"
force = true
status = 200
# SPA history mode routing. Keep this last:
[[redirects]]
from = "/*"
# app.html is not prerendered, unlike index.html (Home page component)
# so we can avoid white flash on routes other than home that were not prerendered
to = "/app.html"
status = 200
# For "Netlify deploy" template button
[template.environment]
STELACE_PUBLISHABLE_API_KEY = "Required: Stelace publishable API key (pubk_test_…)"
VUE_APP_SERVICE_NAME = "Service name: injected in various contents"
VUE_APP_DEFAULT_LANGUAGE = "Language: currently en (default) or fr"
VUE_APP_DEFAULT_CURRENCY = "Currency: ISO code like USD (default) or EUR"
VUE_APP_MAPBOX_STYLE = "Map tiles provider style URL (we suggest Maptiler)"
VUE_APP_MAPBOX_TOKEN = "Map token: not needed if token is included in style URL"
VUE_APP_NOMINATIM_HOST = "Nominatim API provider like https://open.mapquestapi.com"
VUE_APP_NOMINATIM_KEY = "Nominatim provider API key to to enable place search"
VUE_APP_GOOGLE_ANALYTICS_ID = "Google Analytics ID: UA-XXXXXXXX-1"
# Continuous deployment
[context.production]
# Production-specific X-Robots-Tag and Content-Security-Policy headers
command = "sed -i 's|noindex, nofollow|all|g; s|localhost:[*]||g' netlify.toml && yarn build"
[context.production.environment]
VUE_APP_NOMINATIM_HOST = "https://open.mapquestapi.com"
# Filling these in Netlify UI rather than here
# to avoid leaking and commiting secrets to repo:
# Stelace publishable key
# STELACE_PUBLISHABLE_API_KEY
# Map/Nominatim
# VUE_APP_MAPBOX_STYLE
# VUE_APP_NOMINATIM_KEY
# Analytics
# VUE_APP_GOOGLE_ANALYTICS_ID
# Additional services
# NEXMO_API_KEY and NEXMO_API_SECRET
[context.dev]
[context.dev.environment]
VUE_APP_NOMINATIM_HOST = "https://open.mapquestapi.com"
VUE_APP_GOOGLE_ANALYTICS_ID = "UA-XXXXXXXX-1"
VUE_APP_CDN_UPLOAD_PREFIX = "dev/cd"
# Deploy-preview context must be set explicitly.
# It is expected to be roughly the same as dev branch context
[context.deploy-preview]
[context.deploy-preview.environment]
VUE_APP_NOMINATIM_HOST = "https://open.mapquestapi.com"
VUE_APP_GOOGLE_ANALYTICS_ID = "UA-XXXXXXXX-1"
VUE_APP_CDN_UPLOAD_PREFIX = "dev/cd"
[context.branch-deploy]
[context.branch-deploy.environment]
VUE_APP_NOMINATIM_HOST = "https://open.mapquestapi.com"
VUE_APP_GOOGLE_ANALYTICS_ID = "UA-XXXXXXXX-1"
VUE_APP_CDN_UPLOAD_PREFIX = "dev/cd"