-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCaddyfile
More file actions
45 lines (41 loc) · 1.2 KB
/
Caddyfile
File metadata and controls
45 lines (41 loc) · 1.2 KB
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
vitask.app {
encode zstd gzip
@pwa_manifest path /manifest.webmanifest
header @pwa_manifest {
Content-Type "application/manifest+json"
Cache-Control "no-cache"
}
@pwa_sw path /sw.js
header @pwa_sw {
Content-Type "application/javascript; charset=utf-8"
Cache-Control "no-cache"
}
reverse_proxy frontend:80
header {
Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"
X-Content-Type-Options "nosniff"
Referrer-Policy "strict-origin-when-cross-origin"
}
}
api.vitask.app {
encode zstd gzip
handle / {
# Handle CORS preflight requests
if_method OPTIONS {
header {
Access-Control-Allow-Origin "https://vitask.app"
Access-Control-Allow-Methods "GET, POST, PATCH, DELETE, OPTIONS"
Access-Control-Allow-Headers "Authorization, Content-Type, Set-Cookie, Cookie, X-Requested-With"
Access-Control-Allow-Credentials "true"
Access-Control-Max-Age "86400"
}
respond 204
}
reverse_proxy backend:8000
}
header {
Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"
X-Content-Type-Options "nosniff"
Referrer-Policy "strict-origin-when-cross-origin"
}
}