Caddyfile v2 for Ruby on Rails application
http://{$CADDY_HOST}:{$CADDY_PORT} { | |
root * ./public | |
@notStatic { | |
not { | |
file { | |
try_files {path} | |
} | |
} | |
} | |
reverse_proxy @notStatic { | |
to localhost:{$CADDY_BACKEND_PORT} | |
header_up X-Real-IP {remote_host} | |
header_up X-Forwarded-Proto {scheme} | |
header_up Access-Control-Allow-Origin * | |
header_up Access-Control-Allow-Credentials true | |
header_up Access-Control-Allow-Headers Cache-Control,Content-Type | |
transport http { | |
read_buffer 8192 | |
} | |
} | |
file_server | |
} |
This comment has been minimized.
This comment has been minimized.
for Caddyfile v1, check this out |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This comment has been minimized.
Adapt most of the config from this URL