Skip to content

Commit f025229

Browse files
Andrew Farriesroboquat
Andrew Farries
authored andcommitted
Run caddy fmt
1 parent 710c7ff commit f025229

File tree

1 file changed

+27
-28
lines changed

1 file changed

+27
-28
lines changed

components/proxy/conf/Caddyfile

Lines changed: 27 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@
1212

1313
# configure plugin order
1414
# https://caddyserver.com/docs/caddyfile/directives#directive-order
15-
order gitpod.cors_origin before header
16-
order gitpod.workspace_download before redir
17-
order gitpod.headless_log_download before rewrite
18-
order gitpod.configcat before rewrite
19-
order gitpod.sec_websocket_key before header
15+
order gitpod.cors_origin before header
16+
order gitpod.workspace_download before redir
17+
order gitpod.headless_log_download before rewrite
18+
order gitpod.configcat before rewrite
19+
order gitpod.sec_websocket_key before header
2020

2121
servers {
22-
protocols h1 h2 h2c
23-
}
22+
protocols h1 h2 h2c
23+
}
2424
}
2525

2626
(compression) {
@@ -31,15 +31,15 @@
3131
(security_headers) {
3232
header {
3333
# enable HSTS
34-
Strict-Transport-Security max-age=31536000
34+
Strict-Transport-Security max-age=31536000
3535
# disable clients from sniffing the media type
36-
X-Content-Type-Options nosniff
36+
X-Content-Type-Options nosniff
3737
# Define valid parents that may embed a page
38-
Content-Security-Policy "frame-ancestors 'self' https://*.{$GITPOD_DOMAIN} https://{$GITPOD_DOMAIN}"
38+
Content-Security-Policy "frame-ancestors 'self' https://*.{$GITPOD_DOMAIN} https://{$GITPOD_DOMAIN}"
3939
# keep referrer data off of HTTP connections
40-
Referrer-Policy no-referrer-when-downgrade
40+
Referrer-Policy no-referrer-when-downgrade
4141
# Enable cross-site filter (XSS) and tell browser to block detected attacks
42-
X-XSS-Protection "1; mode=block"
42+
X-XSS-Protection "1; mode=block"
4343

4444
defer # delay changes
4545
}
@@ -143,10 +143,10 @@
143143

144144
# public-api
145145
api.{$GITPOD_DOMAIN} {
146-
log {
147-
level DEBUG
148-
output stdout
149-
}
146+
log {
147+
level DEBUG
148+
output stdout
149+
}
150150

151151
gitpod.cors_origin {
152152
allowed_origins https://{$GITPOD_DOMAIN}
@@ -155,7 +155,6 @@ api.{$GITPOD_DOMAIN} {
155155
reverse_proxy public-api-server.{$KUBE_NAMESPACE}.{$KUBE_DOMAIN}:9002
156156
}
157157

158-
159158
# always redirect to HTTPS
160159
http:// {
161160
redir https://{host}{uri} permanent
@@ -206,15 +205,15 @@ https://{$GITPOD_DOMAIN} {
206205
}
207206

208207
@backend_wss {
209-
path /api/gitpod
208+
path /api/gitpod
210209
}
211210
handle @backend_wss {
212-
gitpod.sec_websocket_key
211+
gitpod.sec_websocket_key
213212

214-
uri strip_prefix /api
215-
reverse_proxy server.{$KUBE_NAMESPACE}.{$KUBE_DOMAIN}:3000 {
216-
import upstream_headers
217-
}
213+
uri strip_prefix /api
214+
reverse_proxy server.{$KUBE_NAMESPACE}.{$KUBE_DOMAIN}:3000 {
215+
import upstream_headers
216+
}
218217
}
219218

220219
@backend path /api/* /headless-logs/*
@@ -309,7 +308,7 @@ https://*.*.{$GITPOD_DOMAIN} {
309308
import workspace_transport
310309
import upstream_headers
311310

312-
header_up X-WSProxy-Host {http.request.host}
311+
header_up X-WSProxy-Host {http.request.host}
313312
}
314313
}
315314

@@ -320,19 +319,19 @@ https://*.*.{$GITPOD_DOMAIN} {
320319
import upstream_headers
321320

322321
header_up X-Gitpod-WorkspaceId {re.host.workspaceID}
323-
header_up X-Gitpod-Port {re.host.workspacePort}
324-
header_up X-WSProxy-Host {http.request.host}
322+
header_up X-Gitpod-Port {re.host.workspacePort}
323+
header_up X-WSProxy-Host {http.request.host}
325324
}
326325
}
327326

328-
@workspace header_regexp host Host ^(?P<workspaceID>[a-z0-9][0-9a-z\-]+).ws(?P<location>-[a-z0-9]+)?.{$GITPOD_DOMAIN}
327+
@workspace header_regexp host Host ^(?P<workspaceID>[a-z0-9][0-9a-z\-]+).ws(?P<location>-[a-z0-9]+)?.{$GITPOD_DOMAIN}
329328
handle @workspace {
330329
reverse_proxy https://ws-proxy.{$KUBE_NAMESPACE}.{$KUBE_DOMAIN}:9090 {
331330
import workspace_transport
332331
import upstream_headers
333332

334333
header_up X-Gitpod-WorkspaceId {re.host.workspaceID}
335-
header_up X-WSProxy-Host {http.request.host}
334+
header_up X-WSProxy-Host {http.request.host}
336335
}
337336
}
338337

0 commit comments

Comments
 (0)