Skip to content

Commit

Permalink
Fix the Caddyfile for Docker to include rewrite rules (#3246)
Browse files Browse the repository at this point in the history
* Fix stray PHP closing tag in template

* Add rewrites for JS/CSS
  • Loading branch information
jimwins authored Sep 23, 2024
1 parent 5b4be11 commit 8d0ad57
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions docker/caddy/Caddyfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@
# our root is in /srv
root * /app

# Rewrites
rewrite /js/canary.js /js/known.min.js
@css path_regexp css ^/css/[0-9]+/(.*)$
rewrite @css /css/{re.css.1}
@js path_regexp js ^/js/[0-9]+/(.*)$
rewrite @js /js/{re.js.1}

# pass everything else to php
php_fastcgi known:9000 {
env HTTPS on
Expand Down

0 comments on commit 8d0ad57

Please sign in to comment.