mirror of
https://github.com/Cian-H/am-d-model.eu.git
synced 2025-12-22 21:41:57 +00:00
Another caddy fix attempt
This commit is contained in:
@@ -1,38 +1,36 @@
|
|||||||
import repo.caddyfile
|
import repo.caddyfile {
|
||||||
|
admin off
|
||||||
{
|
|
||||||
admin off
|
|
||||||
}
|
}
|
||||||
|
|
||||||
(site) {
|
(site) {
|
||||||
@landing {
|
@landing {
|
||||||
path / /contact* /about* /favicon.png
|
path / /contact* /about* /favicon.png
|
||||||
}
|
}
|
||||||
handle /_app/* {
|
handle /_app/* {
|
||||||
reverse_proxy site:3000
|
reverse_proxy site:3000
|
||||||
}
|
}
|
||||||
handle @landing {
|
handle @landing {
|
||||||
reverse_proxy site:3000 {
|
reverse_proxy site:3000 {
|
||||||
health_uri /health
|
health_uri /health
|
||||||
health_interval 30s
|
health_interval 30s
|
||||||
health_timeout 10s
|
health_timeout 10s
|
||||||
health_status 200
|
health_status 200
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
handle /repo* {
|
handle /repo* {
|
||||||
uri strip_prefix /repo
|
uri strip_prefix /repo
|
||||||
import repo_site
|
import repo_site
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
:80 {
|
:80 {
|
||||||
import site
|
import site
|
||||||
}
|
}
|
||||||
|
|
||||||
http://am-d-model.eu {
|
http://am-d-model.eu {
|
||||||
import site
|
import site
|
||||||
}
|
}
|
||||||
|
|
||||||
am-d-model.eu {
|
am-d-model.eu {
|
||||||
import site
|
import site
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,65 +1,65 @@
|
|||||||
(repo_cors) {
|
(repo_cors) {
|
||||||
header {
|
header {
|
||||||
Access-Control-Allow-Origin *
|
Access-Control-Allow-Origin *
|
||||||
Access-Control-Allow-Methods "GET, POST, PUT, PATCH, DELETE, OPTIONS"
|
Access-Control-Allow-Methods "GET, POST, PUT, PATCH, DELETE, OPTIONS"
|
||||||
Access-Control-Allow-Headers "*"
|
Access-Control-Allow-Headers "*"
|
||||||
Access-Control-Allow-Credentials true
|
Access-Control-Allow-Credentials true
|
||||||
Strict-Transport-Security "max-age=15768000"
|
Strict-Transport-Security "max-age=15768000"
|
||||||
# Request ID tracing
|
# Request ID tracing
|
||||||
+X-Request-ID {uuid}
|
+X-Request-ID {uuid}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
(repo_common_proxy) {
|
(repo_common_proxy) {
|
||||||
# Set headers similar to uwsgi_param
|
# Set headers similar to uwsgi_param
|
||||||
header_up Host {host}
|
header_up Host {host}
|
||||||
header_up X-Request-ID {uuid}
|
header_up X-Request-ID {uuid}
|
||||||
# Remove sensitive headers
|
# Remove sensitive headers
|
||||||
header_down -X-Session-ID
|
header_down -X-Session-ID
|
||||||
header_down -X-User-ID
|
header_down -X-User-ID
|
||||||
}
|
}
|
||||||
|
|
||||||
(repo_site) {
|
(repo_site) {
|
||||||
import repo_cors
|
import repo_cors
|
||||||
|
|
||||||
# UI Server routes
|
# UI Server routes
|
||||||
handle / {
|
handle / {
|
||||||
request_body {
|
request_body {
|
||||||
max_size 100MB
|
max_size 100MB
|
||||||
}
|
}
|
||||||
reverse_proxy repo-web-ui:5000 {
|
reverse_proxy repo-web-ui:5000 {
|
||||||
import repo_common_proxy
|
import repo_common_proxy
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# API routes
|
# API routes
|
||||||
handle /api/* {
|
handle /api/* {
|
||||||
request_body {
|
request_body {
|
||||||
max_size 100MB
|
max_size 100MB
|
||||||
}
|
}
|
||||||
reverse_proxy repo-web-api:5000 {
|
reverse_proxy repo-web-api:5000 {
|
||||||
import repo_common_proxy
|
import repo_common_proxy
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Large file upload API routes
|
# Large file upload API routes
|
||||||
handle_path /api/records/*/draft/files/*/content {
|
handle_path /api/records/*/draft/files/*/content {
|
||||||
request_body {
|
request_body {
|
||||||
max_size 250GB
|
max_size 250GB
|
||||||
}
|
}
|
||||||
reverse_proxy repo-web-api:5000 {
|
encode gzip
|
||||||
import repo_common_proxy
|
reverse_proxy repo-web-api:5000 {
|
||||||
encode gzip
|
import repo_common_proxy
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
handle /static/* {
|
handle /static/* {
|
||||||
root * /opt/invenio/var/instance/static
|
root * /opt/invenio/var/instance/static
|
||||||
file_server
|
file_server
|
||||||
}
|
}
|
||||||
|
|
||||||
handle /robots.txt {
|
handle /robots.txt {
|
||||||
root * /opt/invenio/var/instance/static
|
root * /opt/invenio/var/instance/static
|
||||||
file_server
|
file_server
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user