mirror of
https://github.com/Noratrieb/vps.git
synced 2026-01-14 16:55:00 +01:00
Update to NixOS 24.11
This commit is contained in:
parent
839a438272
commit
23bbc31969
13 changed files with 60 additions and 22 deletions
108
newinfra/nix/modules/caddy/vps1.Caddyfile
Normal file
108
newinfra/nix/modules/caddy/vps1.Caddyfile
Normal file
|
|
@ -0,0 +1,108 @@
|
|||
# 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
|
||||
}
|
||||
|
||||
uptime.noratrieb.dev {
|
||||
log
|
||||
encode zstd gzip
|
||||
reverse_proxy * localhost:5010
|
||||
}
|
||||
|
||||
hugo-chat.noratrieb.dev {
|
||||
log
|
||||
encode zstd gzip
|
||||
reverse_proxy * localhost:5002
|
||||
}
|
||||
|
||||
api.hugo-chat.noratrieb.dev {
|
||||
log
|
||||
import cors https://hugo-chat.noratrieb.dev "DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type"
|
||||
encode zstd gzip
|
||||
reverse_proxy * localhost:5001
|
||||
}
|
||||
|
||||
bisect-rustc.noratrieb.dev {
|
||||
log
|
||||
encode zstd gzip
|
||||
reverse_proxy * localhost:5005
|
||||
}
|
||||
|
||||
docker.noratrieb.dev {
|
||||
log
|
||||
reverse_proxy * localhost:5000
|
||||
}
|
||||
|
||||
################################################################
|
||||
# redirects
|
||||
|
||||
blog.noratrieb.dev {
|
||||
log
|
||||
redir https://noratrieb.dev/blog{uri} permanent
|
||||
}
|
||||
|
||||
nilstrieb.dev {
|
||||
log
|
||||
redir https://noratrieb.dev{uri} permanent
|
||||
}
|
||||
|
||||
www.nilstrieb.dev {
|
||||
log
|
||||
redir https://noratrieb.dev{uri} permanent
|
||||
}
|
||||
|
||||
blog.nilstrieb.dev {
|
||||
log
|
||||
redir https://noratrieb.dev/blog{uri} permanent
|
||||
}
|
||||
|
||||
bisect-rustc.nilstrieb.dev {
|
||||
log
|
||||
redir https://bisect-rustc.dev/blog{uri} permanent
|
||||
}
|
||||
|
||||
docker.nilstrieb.dev {
|
||||
log
|
||||
redir https://docker.noratrieb.dev{uri} permanent
|
||||
}
|
||||
|
||||
hugo-chat.nilstrieb.dev {
|
||||
log
|
||||
redir https://hugo-chat.noratrieb.dev{uri} permanent
|
||||
}
|
||||
|
||||
api.hugo-chat.nilstrieb.dev {
|
||||
log
|
||||
redir https://api.hugo-chat.noratrieb.dev{uri} permanent
|
||||
}
|
||||
|
||||
uptime.nilstrieb.dev {
|
||||
log
|
||||
redir https://uptime.noratrieb.dev{uri} permanent
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue