Skip to content

Commit be9b9c9

Browse files
committed
feat: update the caddyfile
1 parent e1728c8 commit be9b9c9

1 file changed

Lines changed: 33 additions & 22 deletions

File tree

Caddyfile.example

Lines changed: 33 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,42 @@
1-
new.freesmlauncher.org {
2-
root * /home/github/website/dist
3-
encode gzip
1+
freesmlauncher.org {
2+
handle /feed {
3+
reverse_proxy localhost:00000
4+
encode gzip
5+
}
6+
handle /api/badges/telegram {
7+
reverse_proxy localhost:00000
8+
encode gzip
9+
}
410

5-
redir /telegram https://t.me/freesmteam
6-
redir /discord https://discord.gg/6jjw4gjy4w
7-
redir /reddit https://www.reddit.com/r/FreesmLauncher
11+
handle {
12+
root * /home/github/website/dist
13+
encode gzip
814

9-
try_files {path} /index.html
10-
file_server {
11-
hide .git
12-
}
15+
redir /telegram https://t.me/freesmteam
16+
redir /discord https://discord.gg/6jjw4gjy4w
17+
redir /reddit https://www.reddit.com/r/FreesmLauncher
1318

14-
@cors_preflight method OPTIONS
19+
try_files {path} /index.html
20+
file_server {
21+
hide .git
22+
}
1523

16-
header {
17-
Cache-Control max-age=3600
18-
Access-Control-Allow-Origin "{header.origin}"
19-
Vary Origin
20-
Access-Control-Expose-Headers "Authorization"
21-
Access-Control-Allow-Credentials "true"
22-
}
24+
@cors_preflight method OPTIONS
2325

24-
handle @cors_preflight {
2526
header {
26-
Access-Control-Allow-Methods "GET, POST, PUT, PATCH, DELETE"
27-
Access-Control-Max-Age "3600"
27+
Cache-Control max-age=3600
28+
Access-Control-Allow-Origin "{header.origin}"
29+
Vary Origin
30+
Access-Control-Expose-Headers "Authorization"
31+
Access-Control-Allow-Credentials "true"
32+
}
33+
34+
handle @cors_preflight {
35+
header {
36+
Access-Control-Allow-Methods "GET, POST, PUT, PATCH, DELETE"
37+
Access-Control-Max-Age "3600"
38+
}
39+
respond "" 204
2840
}
29-
respond "" 204
3041
}
3142
}

0 commit comments

Comments
 (0)