Skip to content

Commit bcc611d

Browse files
Fix format of Caddydfile
1 parent b63674a commit bcc611d

File tree

1 file changed

+51
-51
lines changed

1 file changed

+51
-51
lines changed

Caddyfile

+51-51
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,65 @@
11
{
2-
default_sni {$VIRTUAL_HOST}
2+
default_sni {$VIRTUAL_HOST}
33
}
44

55
(cors) {
6-
@cors_preflight method OPTIONS
7-
header {
8-
Access-Control-Allow-Origin "{args.0}"
9-
Vary Origin
10-
Access-Control-Allow-Headers "*"
11-
Access-Control-Expose-Headers "Authorization, Link, X-Result-Count"
12-
Access-Control-Allow-Credentials "true"
13-
}
14-
handle @cors_preflight {
15-
header {
16-
Access-Control-Allow-Methods "GET, POST, PUT, PATCH, DELETE"
17-
Access-Control-Allow-Headers "*"
18-
Access-Control-Max-Age "3600"
19-
}
20-
respond "" 204
21-
}
6+
@cors_preflight method OPTIONS
7+
header {
8+
Access-Control-Allow-Origin "{args.0}"
9+
Vary Origin
10+
Access-Control-Allow-Headers "*"
11+
Access-Control-Expose-Headers "Authorization, Link, X-Result-Count"
12+
Access-Control-Allow-Credentials "true"
13+
}
14+
handle @cors_preflight {
15+
header {
16+
Access-Control-Allow-Methods "GET, POST, PUT, PATCH, DELETE"
17+
Access-Control-Allow-Headers "*"
18+
Access-Control-Max-Age "3600"
19+
}
20+
respond "" 204
21+
}
2222
}
2323

2424
{$VIRTUAL_HOST} {
25-
tls {$TLS}
25+
tls {$TLS}
2626

27-
handle_errors {
28-
header {
29-
Access-Control-Allow-Origin "{header.origin}"
30-
Access-Control-Allow-Credentials "true"
31-
Vary Origin
32-
}
33-
respond "{http.error.status_code} {http.error.status_text}" {http.error.status_code}
34-
}
27+
handle_errors {
28+
header {
29+
Access-Control-Allow-Origin "{header.origin}"
30+
Access-Control-Allow-Credentials "true"
31+
Vary Origin
32+
}
33+
respond "{http.error.status_code} {http.error.status_text}" {http.error.status_code}
34+
}
3535

36-
import cors {header.origin}
36+
import cors {header.origin}
3737

38-
reverse_proxy /* http://waldur-homeport:8080 {
39-
header_down X-Frame-Options DENY
40-
header_down Content-Security-Policy "base-uri 'self'; object-src 'none'; media-src 'none'; script-src 'self' www.google-analytics.com sentry.opnd.org; style-src 'self' 'unsafe-inline'; img-src 'self' www.google-analytics.com *.gravatar.com *.tile.openstreetmap.org {$VIRTUAL_HOST} blob: data: ; connect-src 'self' {$VIRTUAL_HOST} nominatim.openstreetmap.org:443 sentry.opnd.org:443 sentry.opnd.org:80; font-src 'self' data: ; frame-src 'none'; frame-ancestors 'none'"
41-
header_down Strict-Transport-Security max-age=31536000 always
42-
header_down -Server
43-
}
38+
reverse_proxy /* http://waldur-homeport:8080 {
39+
header_down X-Frame-Options DENY
40+
header_down Content-Security-Policy "base-uri 'self'; object-src 'none'; media-src 'none'; script-src 'self' www.google-analytics.com sentry.opnd.org; style-src 'self' 'unsafe-inline'; img-src 'self' www.google-analytics.com *.gravatar.com *.tile.openstreetmap.org {$VIRTUAL_HOST} blob: data: ; connect-src 'self' {$VIRTUAL_HOST} nominatim.openstreetmap.org:443 sentry.opnd.org:443 sentry.opnd.org:80; font-src 'self' data: ; frame-src 'none'; frame-ancestors 'none'"
41+
header_down Strict-Transport-Security max-age=31536000 always
42+
header_down -Server
43+
}
4444

45-
reverse_proxy /api/* http://waldur-mastermind-api:8080
46-
reverse_proxy /api-auth/* http://waldur-mastermind-api:8080
47-
reverse_proxy /docs/* http://waldur-mastermind-api:8080
48-
reverse_proxy /admin/* http://waldur-mastermind-api:8080
49-
reverse_proxy /static/* http://waldur-mastermind-api:8080
50-
reverse_proxy /media/* http://waldur-mastermind-api:8080
51-
reverse_proxy /apidocs/* http://waldur-mastermind-api:8080
52-
reverse_proxy /health-check/* http://waldur-mastermind-api:8080
53-
reverse_proxy /auth/* http://keycloak:8080
45+
reverse_proxy /api/* http://waldur-mastermind-api:8080
46+
reverse_proxy /api-auth/* http://waldur-mastermind-api:8080
47+
reverse_proxy /docs/* http://waldur-mastermind-api:8080
48+
reverse_proxy /admin/* http://waldur-mastermind-api:8080
49+
reverse_proxy /static/* http://waldur-mastermind-api:8080
50+
reverse_proxy /media/* http://waldur-mastermind-api:8080
51+
reverse_proxy /apidocs/* http://waldur-mastermind-api:8080
52+
reverse_proxy /health-check/* http://waldur-mastermind-api:8080
53+
reverse_proxy /auth/* http://keycloak:8080
5454

55-
route /rmqws {
56-
rewrite /rmqws /ws
57-
reverse_proxy http://waldur-queue:15675 {
58-
header_up Host {host}
59-
header_up X-Forwarded-For {remote}
60-
header_up X-Real-IP {remote}
61-
}
62-
}
55+
route /rmqws {
56+
rewrite /rmqws /ws
57+
reverse_proxy http://waldur-queue:15675 {
58+
header_up Host {host}
59+
header_up X-Forwarded-For {remote}
60+
header_up X-Real-IP {remote}
61+
}
62+
}
6363

64-
import /etc/caddy-includes/*.conf
64+
import /etc/caddy-includes/*.conf
6565
}

0 commit comments

Comments
 (0)