-
Notifications
You must be signed in to change notification settings - Fork 0
/
Caddyfile
executable file
·35 lines (29 loc) · 1.08 KB
/
Caddyfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
:8080 {
log {
output file /app/data/dcpd_caddy.log {
roll_size 50mb
roll_keep 5
roll_keep_for 240h
}
}
# Assuming you have environment variables named BASIC_AUTH_USER and BASIC_AUTH_HASHED_PASS
basicauth /* {
{BASIC_AUTH_USER} {BASIC_AUTH_HASHED_PASS}
}
# Serve JavaScript files with the correct MIME type
@jsFiles path *.js
header @jsFiles Content-Type application/javascript
# Serve CSS files with the correct MIME type
@cssFiles path *.css
header @cssFiles Content-Type text/css
# Set MIME type for the --dynamic-font-link path
@fontLink path /--dynamic-font-link
header @fontLink Content-Type text/css
# Serve CSV files with the correct MIME type
@csvFiles path *.csv
header @csvFiles Content-Type text/csv
encode gzip
root * /app
try_files {path} /config/dcpd_output.html
file_server browse
}