diff --git a/web/Caddyfile b/web/Caddyfile new file mode 100644 index 0000000..c8fcc6f --- /dev/null +++ b/web/Caddyfile @@ -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 +} \ No newline at end of file