forked from codesandbox/codesandbox-client
-
Notifications
You must be signed in to change notification settings - Fork 15
/
Caddyfile
40 lines (34 loc) · 1.29 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
36
37
38
39
40
# Set the default listening port, also enable HTTPS for local development.
{
http_port 8080
https_port 8443
# HTTPS is suppossed to be used for local development only.
# For production, we've a nginx proxy to route and do the HTTPS stuff.
#
# If you're sure to use HTTPS with owned domain, remove the following lines,
# so that Caddy will use a valid ACME CA to sign a trusted certificate.
auto_https disable_redirects
local_certs
}
# To use HTTPS, change the next line after comments into your specific domain.
#
# The domain name should use the same second-level domain as Tango.
# For example, if Tango is hosted on tango.example.com, then you can set it to
# any subdomain of example.com like csb.example.com.
#
# For local development, make sure you've put your domain into your hosts file,
# and point it to 127.0.0.1.
# For production, make sure your domain's A/AAAA DNS records are properly
# pointed to this machine's public IP.
:8080
# Built files will be saved into ./www/.
root * ./www
# Enable the static file server.
file_server
# Set this header to allow modifying document.domain in Chrome 115.
# https://developer.chrome.com/blog/document-domain-setter-deprecation/
header {
Origin-Agent-Cluster ?0
}
# Handle URL with search query.
try_files {path} {path}/ /index.html?{query}