Repository navigation
Expand file tree
/
Copy pathCaddyfile
More file actions
85 lines (73 loc) · 1.75 KB
/
Copy pathCaddyfile
File metadata and controls
85 lines (73 loc) · 1.75 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
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
# global options
{
admin off
persist_config off
auto_https off
# log {
# format json
# }
servers {
trusted_proxies static private_ranges 100.0.0.0/8
}
}
:{$PORT:8080} {
handle /health {
respond "OK" 200
}
@notMainDomain {
not header Host docs.rw
}
handle @notMainDomain {
redir https://docs.rw{uri} permanent
}
@oldDocs path_regexp olddocs ^/docs/(.+)$
@mainDomain {
header Host docs.rw
}
handle @mainDomain {
redir /prime* https://t.me/xrocket?start=sb_E6HxjZHitIM98el permanent
redir /apps /clients permanent
redir /docs/changelog* https://f.docs.rw/c/announces/14 permanent
redir /changelog* https://f.docs.rw/c/announces/14 permanent
redir /blog* https://f.docs.rw/c/announces/blog/19 permanent
redir /docs/ /overview/quick-start permanent
redir /docs /overview/quick-start permanent
redir @oldDocs /{re.olddocs.1} permanent
handle / {
root * /app/landing
encode gzip
file_server
try_files {path} /index.html
header {
X-Content-Type-Options "nosniff"
X-Frame-Options "DENY"
X-XSS-Protection "1; mode=block"
Strict-Transport-Security "max-age=63072000; includeSubDomains"
}
}
handle_path /landing-assets/* {
root * /app/landing/landing-assets
encode gzip
file_server
try_files {path} /index.html
header {
X-Content-Type-Options "nosniff"
X-Frame-Options "DENY"
X-XSS-Protection "1; mode=block"
Strict-Transport-Security "max-age=63072000; includeSubDomains"
}
}
handle {
root * /app/docs
encode gzip
file_server
try_files {path} {path}/ /404.html
header {
X-Content-Type-Options "nosniff"
X-Frame-Options "DENY"
X-XSS-Protection "1; mode=block"
Strict-Transport-Security "max-age=63072000; includeSubDomains"
}
}
}
}