Skip to content

Instantly share code, notes, and snippets.

@nick-cheatwood7
Created February 23, 2023 17:36
Show Gist options
  • Save nick-cheatwood7/944dcebb841b0dac81ade1827b81f3ea to your computer and use it in GitHub Desktop.
Save nick-cheatwood7/944dcebb841b0dac81ade1827b81f3ea to your computer and use it in GitHub Desktop.
{
email [email protected]
}
https://example.com {
encode gzip
# Proxy API requests to the backend server
handle /api/* {
header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"
header Content-Type application/json
reverse_proxy backend-server:4000
}
# Proxy GraphQL requests to the backend server
handle /graphql {
header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"
header Content-Type application/json
reverse_proxy backend-server:4000
}
handle {
root * /var/www/html
try_files {path} /index.html
file_server
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment