mirror of
https://github.com/Noratrieb/vps.git
synced 2026-01-14 16:55:00 +01:00
files.noratrieb.dev
This commit is contained in:
parent
2bd8830cd0
commit
4f1201741a
4 changed files with 34 additions and 26 deletions
|
|
@ -21,6 +21,32 @@
|
|||
}
|
||||
}
|
||||
|
||||
# https://gist.github.com/ryanburnette/d13575c9ced201e73f8169d3a793c1a3
|
||||
(cors) {
|
||||
@cors_preflight{args[0]} method OPTIONS
|
||||
@cors{args[0]} header Origin {args[0]}
|
||||
|
||||
handle @cors_preflight{args[0]} {
|
||||
header {
|
||||
Access-Control-Allow-Origin "{args[0]}"
|
||||
Access-Control-Allow-Methods "GET, POST, PUT, PATCH, DELETE, OPTIONS"
|
||||
Access-Control-Allow-Credentials "false"
|
||||
Access-Control-Allow-Headers "${args[1]}"
|
||||
Access-Control-Max-Age "86400"
|
||||
defer
|
||||
}
|
||||
respond "" 204
|
||||
}
|
||||
|
||||
handle @cors{args[0]} {
|
||||
header {
|
||||
Access-Control-Allow-Origin "{args[0]}"
|
||||
Access-Control-Expose-Headers *
|
||||
defer
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
http:// {
|
||||
log
|
||||
respond "This is an HTTPS-only server, silly you. Go to https:// instead." 418
|
||||
|
|
|
|||
|
|
@ -70,6 +70,13 @@ in
|
|||
precompressed zstd gzip br
|
||||
}
|
||||
}
|
||||
|
||||
files.noratrieb.dev {
|
||||
log
|
||||
encode zstd gzip
|
||||
|
||||
reverse_proxy * localhost:3902
|
||||
}
|
||||
'' else ""
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,29 +1,3 @@
|
|||
# https://gist.github.com/ryanburnette/d13575c9ced201e73f8169d3a793c1a3
|
||||
(cors) {
|
||||
@cors_preflight{args[0]} method OPTIONS
|
||||
@cors{args[0]} header Origin {args[0]}
|
||||
|
||||
handle @cors_preflight{args[0]} {
|
||||
header {
|
||||
Access-Control-Allow-Origin "{args[0]}"
|
||||
Access-Control-Allow-Methods "GET, POST, PUT, PATCH, DELETE, OPTIONS"
|
||||
Access-Control-Allow-Credentials "false"
|
||||
Access-Control-Allow-Headers "${args[1]}"
|
||||
Access-Control-Max-Age "86400"
|
||||
defer
|
||||
}
|
||||
respond "" 204
|
||||
}
|
||||
|
||||
handle @cors{args[0]} {
|
||||
header {
|
||||
Access-Control-Allow-Origin "{args[0]}"
|
||||
Access-Control-Expose-Headers *
|
||||
defer
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
www.noratrieb.dev {
|
||||
log
|
||||
redir https://noratrieb.dev{uri} permanent
|
||||
|
|
|
|||
|
|
@ -57,6 +57,7 @@ let
|
|||
# --- website stuff
|
||||
blog = vps1;
|
||||
www = vps1;
|
||||
files = combine [ vps1 vps3 vps4 ];
|
||||
|
||||
# --- legacy crap
|
||||
old-docker = vps2;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue