This proxy enables using Fastly's HTTPS log streaming with Compute@Edge support to services that cannot implement Fastly's challenge/response protocolo, like RequestBin, Zapier and others.
This small server supports the Fastly HTTPS logging challenge at /.well-known/fastly/logging/challenge
and proxes to the server URL at the environment variable PROXY_URL
without a challenge-response.
Note: It is configured to be deployed to Heroku's free tier for testing purposes. This can be adjusted by forking this repo and editing the app.json
file.
See more here:
- Proxy server-side logging from HTTPS log streaming
- Heroku one button deployment (default to free tier)
- Papertrail logging on Heroku (defaulls to free tier). Currently covers proxy service only
- Proxy Fastly server-side logging directly to Papertrail
- Fastly CLI Tail Logging support by implementing subscription service
During the installation process, set the following environment variables.
Variable | Type | Required | Notes |
---|---|---|---|
PORT |
integer | n | auto-populated by Heroku |
FASTLY_SERVICE_IDS |
string | n | a comma-delimited list of Service IDs. To support any Service ID, leave empty or explicitly set to * . Do not run the SHA256 checksum yourself, as the proxy service will automaticaly hash the Service IDs in the FASTLY_SERVICE_IDS environment variable. |
PROXY_URL |
string | y | the URL where the incoming body should be posted to. Only HTTP POST method is supported for now. |
Once this is set up, set your Heroku URL to be your Fastly logging endpoint, for example:
https://{my-log-proxy}.herokuapp.com
The challenge response will be automatically provided at:
https://{my-log-proxy}.herokuapp.com/.well-known/fastly/logging/challenge
If you want to run this service locally, you can do this by running it behind a ngrok reverse proxy.
For other deployment modes, this is a simple zero-dependency net/http
server and should be easy to deploy.