generated from manuelernestog/astrofy
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazion.config.mjs
48 lines (48 loc) · 1.04 KB
/
azion.config.mjs
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
export default {
origin: [
{
name: 'origin-storage-default',
type: 'object_storage'
}
],
rules: {
request: [
{
name: 'Set Storage Origin for All Requests',
match: '^\\/',
behavior: {
setOrigin: {
name: 'origin-storage-default',
type: 'object_storage'
}
}
},
{
name: 'Deliver Static Assets',
match:
'.(css|js|ttf|woff|woff2|pdf|svg|jpg|jpeg|gif|bmp|png|ico|mp4|json|xml|html)$',
behavior: {
setOrigin: {
name: 'origin-storage-default',
type: 'object_storage'
},
deliver: true
}
},
{
name: 'Redirect to index.html',
match: '.*/$',
behavior: {
rewrite: '${uri}index.html'
}
},
{
name: 'Redirect to index.html for Subpaths',
match: '^(?!.*\\/$)(?![\\s\\S]*\\.[a-zA-Z0-9]+$).*',
behavior: {
rewrite: '${uri}/index.html'
}
}
]
}
}