You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
752 B
47 lines
752 B
{
|
|
order jwtauth before basicauth
|
|
}
|
|
|
|
:80 {
|
|
encode zstd gzip
|
|
|
|
handle_path /api/v1/* {
|
|
rewrite * {path}
|
|
reverse_proxy geodata:8000
|
|
}
|
|
|
|
redir /openapi.json /api/v1/openapi.json permanent
|
|
|
|
handle_path /martin/* {
|
|
rewrite * {path}
|
|
reverse_proxy martin:3000
|
|
}
|
|
|
|
@is_admin {
|
|
vars {http.auth.user.id} "demo"
|
|
}
|
|
|
|
handle_path /pgweb/* {
|
|
jwtauth {
|
|
sign_key iYg7wB+sPihtjz50iJTsD0XmOeUwKy2TJtfNLcqFRM8=
|
|
}
|
|
|
|
rewrite * {path}
|
|
reverse_proxy @is_admin pgweb:8081
|
|
redir /login/ 401
|
|
}
|
|
|
|
handle_path /static/previews/* {
|
|
rewrite * {path}
|
|
file_server
|
|
}
|
|
|
|
# play nice with vue-router
|
|
# https://caddy.community/t/caddy-with-vue-router/12352
|
|
handle {
|
|
root * /usr/share/caddy
|
|
try_files {path}.html {path} /index.html
|
|
file_server
|
|
}
|
|
}
|