fixed caddyfile
This commit is contained in:
@@ -45,7 +45,7 @@ WORKDIR /usr/share/pweb
|
||||
COPY frontend/pweb/entrypoint.sh /entrypoint.sh
|
||||
COPY frontend/pweb/caddy/Caddyfile /etc/caddy/Caddyfile
|
||||
COPY --from=web_builder /home/flutteruser/app/pweb/build/web /usr/share/pweb
|
||||
COPY interface /usr/share/pweb/docs
|
||||
COPY interface /usr/share/docs
|
||||
|
||||
RUN chmod +x /entrypoint.sh
|
||||
|
||||
|
||||
@@ -72,6 +72,30 @@
|
||||
respond "forbidden" 403
|
||||
}
|
||||
|
||||
########################################
|
||||
# API docs (ReDoc)
|
||||
########################################
|
||||
handle /docs {
|
||||
redir * /docs/ 308
|
||||
}
|
||||
|
||||
handle /docs/ {
|
||||
root * {vars.static_root}/docs
|
||||
rewrite * /doc.html
|
||||
file_server
|
||||
header Cache-Control "no-cache, no-store, must-revalidate"
|
||||
header Pragma "no-cache"
|
||||
header Expires "0"
|
||||
}
|
||||
|
||||
handle_path /docs/* {
|
||||
root * {vars.static_root}/docs
|
||||
file_server
|
||||
header Cache-Control "no-cache, no-store, must-revalidate"
|
||||
header Pragma "no-cache"
|
||||
header Expires "0"
|
||||
}
|
||||
|
||||
########################################
|
||||
# Static assets with tailored caching
|
||||
########################################
|
||||
|
||||
Reference in New Issue
Block a user