mirror of
https://github.com/DefectingCat/candy
synced 2025-07-15 16:51:34 +00:00
47 lines
996 B
TOML
47 lines
996 B
TOML
# Default file type for unknow file
|
|
default_type = "application/octet-stream"
|
|
# Custom MIME types
|
|
[types]
|
|
wasm = "application/wasm"
|
|
|
|
# Virtual host
|
|
[[host]]
|
|
ip = "0.0.0.0"
|
|
port = 4000
|
|
# Connection timeout
|
|
timeout = 15
|
|
# SSL certificate
|
|
# Self sign a certificate
|
|
# sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout ./html/selfsigned.key -out ./html/selfsigned.crt
|
|
certificate = "./html/selfsigned.crt"
|
|
certificate_key = "./html/selfsigned.key"
|
|
|
|
# Add custom headers to response
|
|
[host.headers]
|
|
X-Powered-By = "candy"
|
|
|
|
# Routes for virtual host
|
|
[[host.route]]
|
|
# Route location
|
|
location = "/"
|
|
# Static file root
|
|
# or proxy_pass
|
|
# or redirect
|
|
root = "./html"
|
|
# Only use for root field
|
|
index = ["index.html"]
|
|
# Custom 500 page
|
|
[host.route.error_page]
|
|
status = 500
|
|
page = "500.html"
|
|
# Custom 404 page
|
|
[host.route.not_found_page]
|
|
status = 404
|
|
page = "404.html"
|
|
|
|
[[host.route]]
|
|
location = "/proxy/"
|
|
proxy_pass = "http://localhost:3000/"
|
|
# Timeout for connect to upstream
|
|
proxy_timeout = 10
|