52 lines
1 KiB
Plaintext
52 lines
1 KiB
Plaintext
example.com {
|
|
redir 301 {
|
|
/.well-known/host-meta https://mastodon.barkshark.tk{uri}
|
|
}
|
|
}
|
|
|
|
mastodon.example.com {
|
|
root /home/mastodon/mastodon/public
|
|
log /var/log/mastodon-access.log {
|
|
rotate_size 2
|
|
rotate_keep 30
|
|
}
|
|
errors /var/log/mastodon-error.log {
|
|
* 500.html
|
|
rotate_size 2
|
|
rotate_keep 30
|
|
}
|
|
|
|
gzip
|
|
|
|
header / {
|
|
Strict-Transport-Security "max-age=31536000;"
|
|
#-Content-Security-Policy
|
|
}
|
|
|
|
header /emoji Cache-Control "public, max-age=31536000, immutable"
|
|
header /packs Cache-Control "public, max-age=31536000, immutable"
|
|
header /system/accounts/avatars Cache-Control "public, max-age=31536000, immutable"
|
|
header /system/media_attachments/files Cache-Control "public, max-age=31536000, immutable"
|
|
|
|
rewrite {
|
|
if {path} is /
|
|
to /proxy{path}
|
|
}
|
|
|
|
rewrite {
|
|
if {path} not_has /api/v1/streaming
|
|
to {path} /proxy{path}
|
|
}
|
|
|
|
proxy /proxy localhost:3000 {
|
|
without /proxy
|
|
|
|
transparent
|
|
websocket
|
|
}
|
|
|
|
proxy /api/v1/streaming localhost:4000 {
|
|
transparent
|
|
websocket
|
|
}
|
|
} |