Skip to content

Commit 3e2d1b3

Browse files
committed
Rename vars
1 parent ff3298f commit 3e2d1b3

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

‎.devcontainer/caddy/Caddyfile‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,26 +28,26 @@
2828
expression {http.request.scheme}=="https" || {header.X-Forwarded-Scheme}=="https"
2929
}
3030
# If any http scheme is "https", then use "wss"
31-
vars @http_scheme WsScheme "wss"
31+
vars @http_scheme ws.scheme "wss"
3232
# Else default to "ws"
33-
vars WsScheme "ws"
33+
vars ws.scheme "ws"
3434

3535
# Matcher for forwarded request headers
3636
@host_forwarded {
3737
header X-Forwarded-Host *
3838
}
3939
# If http headers exists, then use them
40-
vars @host_forwarded WsHost {header.X-Forwarded-Host}
40+
vars @host_forwarded ws.host {header.X-Forwarded-Host}
4141
# Else default to host in request
42-
vars WsHost {http.request.hostport}
42+
vars ws.host {http.request.hostport}
4343
}
4444

4545
# Snippet for redirect with given URL queries values
4646
# to simplify remote development with web apps
4747
# E.g auto redirect websocket URL to match request scheme
4848
(redirect) {
4949
# Configure redirect to match request scheme
50-
redir /{args.0}/nav2 /{args.0}/?ds=foxglove-websocket&ds.url={vars.WsScheme}://{vars.WsHost}{path.dir}
50+
redir /{args.0}/nav2 /{args.0}/?ds=foxglove-websocket&ds.url={vars.ws.scheme}://{vars.ws.host}{path.dir}
5151
}
5252

5353
# Listen for http requests on port 8080

‎.devcontainer/caddy/index.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,5 @@
3434
| `header.X-Forwarded-Scheme` | `{{placeholder "header.X-Forwarded-Scheme"}}` |
3535
| `http.request.hostport` | `{{placeholder "http.request.hostport"}}` |
3636
| `http.request.scheme` | `{{placeholder "http.request.scheme"}}` |
37-
| `http.vars.WsHost` | `{{placeholder "http.vars.WsHost"}}` |
38-
| `http.vars.WsScheme` | `{{placeholder "http.vars.WsScheme"}}` |
37+
| `http.vars.ws.host` | `{{placeholder "http.vars.ws.host"}}` |
38+
| `http.vars.ws.scheme` | `{{placeholder "http.vars.ws.scheme"}}` |

0 commit comments

Comments
 (0)