mirror of
https://gitlab.com/bramw/baserow.git
synced 2025-04-08 06:40:07 +00:00
52 lines
955 B
Caddyfile
52 lines
955 B
Caddyfile
{
|
|
on_demand_tls {
|
|
ask {$PRIVATE_BACKEND_URL:localhost:8000}/api/builder/domains/ask-public-domain-exists/
|
|
interval 2m
|
|
burst 5
|
|
}
|
|
|
|
{$BASEROW_CADDY_AUTO_REDIRECT}
|
|
|
|
{$BASEROW_CADDY_GLOBAL_CONF}
|
|
}
|
|
|
|
{$BASEROW_CADDY_ADDRESSES} {
|
|
handle /api/* {
|
|
reverse_proxy {$PRIVATE_BACKEND_URL:localhost:8000}
|
|
}
|
|
|
|
handle /ws/* {
|
|
reverse_proxy {$PRIVATE_BACKEND_URL:localhost:8000}
|
|
}
|
|
|
|
handle_path /media/* {
|
|
@downloads {
|
|
query dl=*
|
|
}
|
|
header @downloads Content-disposition "attachment; filename={query.dl}"
|
|
|
|
file_server {
|
|
root {$MEDIA_ROOT:/baserow/media/}
|
|
}
|
|
}
|
|
|
|
handle_path /static/* {
|
|
file_server {
|
|
root {$STATIC_ROOT:/baserow/static/}
|
|
}
|
|
}
|
|
|
|
reverse_proxy {$PRIVATE_WEB_FRONTEND_URL:localhost:3000}
|
|
}
|
|
|
|
{$BASEROW_CADDY_HTTP_CATCH_ALL} {
|
|
reverse_proxy {$PRIVATE_WEB_FRONTEND_URL:localhost:3000}
|
|
}
|
|
|
|
:443 {
|
|
tls {
|
|
on_demand
|
|
}
|
|
|
|
reverse_proxy {$PRIVATE_WEB_FRONTEND_URL:localhost:3000}
|
|
}
|