separate caddy configs + cleanup
This commit is contained in:
parent
3a8983d054
commit
54e18ead20
7 changed files with 90 additions and 57 deletions
|
|
@ -1,56 +1,6 @@
|
|||
{
|
||||
|
||||
}
|
||||
|
||||
{$DOMAIN} {
|
||||
root * /srv
|
||||
encode gzip
|
||||
handle {
|
||||
try_files {path} /index.html
|
||||
file_server
|
||||
}
|
||||
header /assets/*.js {
|
||||
Service-Worker-Allowed "/"
|
||||
}
|
||||
handle_path /3m/* {
|
||||
reverse_proxy 3m:8001
|
||||
}
|
||||
handle_path /chat {
|
||||
reverse_proxy ergo:8097
|
||||
}
|
||||
handle_path /voice {
|
||||
reverse_proxy grumble:8443
|
||||
}
|
||||
handle_path /video/* {
|
||||
rewrite /video /
|
||||
reverse_proxy mediamtx:8889
|
||||
}
|
||||
}
|
||||
|
||||
{$HOST_DOMAIN} {
|
||||
header Access-Control-Allow-Origin *
|
||||
header Access-Control-Allow-Origin i.cef.icu
|
||||
header Access-Control-Allow-Origin cef.icu
|
||||
@uploads {
|
||||
path_regexp hash ^/uploads/(.*)/.*
|
||||
}
|
||||
|
||||
rewrite @uploads /uploads/{re.hash.1}
|
||||
respond /uploads/ 403
|
||||
respond /pfp/ 403
|
||||
|
||||
handle_path /embed/* {
|
||||
reverse_proxy imagor:8000
|
||||
header -Cache-Control
|
||||
header -Expires
|
||||
header Cache-Control "public, max-age=604800"
|
||||
}
|
||||
|
||||
reverse_proxy minio:9000 {
|
||||
@error status 500 404
|
||||
handle_response @error {
|
||||
root * /srv
|
||||
try_files /assets/theme-cef/blankIcon.png
|
||||
file_server
|
||||
}
|
||||
}
|
||||
}
|
||||
import ./Frontend
|
||||
import ./Imagor
|
||||
|
|
|
|||
24
configs/caddy/Frontend
Normal file
24
configs/caddy/Frontend
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{$DOMAIN} {
|
||||
root * /srv
|
||||
encode gzip
|
||||
handle {
|
||||
try_files {path} /index.html
|
||||
file_server
|
||||
}
|
||||
header /assets/*.js {
|
||||
Service-Worker-Allowed "/"
|
||||
}
|
||||
handle_path /3m/* {
|
||||
reverse_proxy 3m:8001
|
||||
}
|
||||
handle_path /chat {
|
||||
reverse_proxy ergo:8097
|
||||
}
|
||||
handle_path /voice {
|
||||
reverse_proxy grumble:8443
|
||||
}
|
||||
handle_path /video/* {
|
||||
rewrite /video /
|
||||
reverse_proxy mediamtx:8889
|
||||
}
|
||||
}
|
||||
8
configs/caddy/Imagor
Normal file
8
configs/caddy/Imagor
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{$IMAGOR_URL} {
|
||||
header Access-Control-Allow-Origin *
|
||||
header Access-Control-Allow-Origin {$DOMAIN}
|
||||
reverse_proxy imagor:8000
|
||||
header -Cache-Control
|
||||
header -Expires
|
||||
header Cache-Control "public, max-age=604800"
|
||||
}
|
||||
21
configs/caddy/Storage
Normal file
21
configs/caddy/Storage
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{$HOST_DOMAIN} {
|
||||
header Access-Control-Allow-Origin *
|
||||
header Access-Control-Allow-Origin i.cef.icu
|
||||
header Access-Control-Allow-Origin cef.icu
|
||||
@uploads {
|
||||
path_regexp hash ^/uploads/(.*)/.*
|
||||
}
|
||||
|
||||
rewrite @uploads /uploads/{re.hash.1}
|
||||
respond /uploads/ 403
|
||||
respond /pfp/ 403
|
||||
|
||||
reverse_proxy minio:9000 {
|
||||
@error status 500 404
|
||||
handle_response @error {
|
||||
root * /srv
|
||||
try_files /assets/theme-cef/blankIcon.png
|
||||
file_server
|
||||
}
|
||||
}
|
||||
}
|
||||
29
configs/caddy/StorageCombo
Normal file
29
configs/caddy/StorageCombo
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{$HOST_DOMAIN} {
|
||||
header Access-Control-Allow-Origin *
|
||||
header Access-Control-Allow-Origin i.cef.icu
|
||||
header Access-Control-Allow-Origin cef.icu
|
||||
@uploads {
|
||||
path_regexp hash ^/uploads/(.*)/.*
|
||||
}
|
||||
|
||||
rewrite @uploads /uploads/{re.hash.1}
|
||||
respond /uploads/ 403
|
||||
respond /pfp/ 403
|
||||
|
||||
handle_path /embed/* {
|
||||
reverse_proxy imagor:8000
|
||||
header -Cache-Control
|
||||
header -Expires
|
||||
header Cache-Control "public, max-age=604800"
|
||||
}
|
||||
|
||||
|
||||
reverse_proxy minio:9000 {
|
||||
@error status 500 404
|
||||
handle_response @error {
|
||||
root * /srv
|
||||
try_files try_files /assets/theme-cef/blankIcon.png
|
||||
file_server
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue