Skip to content

Instantly share code, notes, and snippets.

@JonathanLorimer
Last active August 11, 2023 15:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JonathanLorimer/21267c31a209ac313c5a66f5cb46de2d to your computer and use it in GitHub Desktop.
Save JonathanLorimer/21267c31a209ac313c5a66f5cb46de2d to your computer and use it in GitHub Desktop.
Caddyfile
:3000 {
log {
output stdout
level DEBUG
}
header {
Access-Control-Allow-Origin localhost:3000
}
# tls ./backend/certs/localhost.crt ./backend/certs/localhost.key
handle /api* {
reverse_proxy 127.0.0.1:8080
}
handle {
try_files {path} /
root * {$ROOT_DIR}/frontend/dist
file_server {
}
encode gzip
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment