Skip to content

Commit

Permalink
Add dev Caddyfile
Browse files Browse the repository at this point in the history
  • Loading branch information
jleach committed Jun 4, 2021
1 parent db4d04e commit 5b659c8
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions web/Caddyfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Where caddy should listen
:2015

# Turn on the Web/file server
file_server
#templates {
# mime "text/javascript" "application/javascript"
#}

# The site root
root * /opt/app-root/src

# Because we should
encode zstd gzip

# This rewrite rule may be required to get React apps
# to deal with trailing slashes properly.
#@filter {
# not path_regexp ^\/0.0.0.0
# file {
# try_files {path} {path}/ /?url={uri}
# }
#}
#rewrite @try_files {http.matchers.file.relative}

# This properly deals with react routes.
try_files {path} {path}/ /index.html

# On OCP we should log to stdout so Prometheus can
# slurp up the logs for human consumption.
log {
#errors stdout
output stdout
format single_field common_log
level info
}

0 comments on commit 5b659c8

Please sign in to comment.