Proxing or Self-hosting
In some cases, our codes can have a custom prefix (also sometimes called a "vanity url"), and in some cases the client wants these scans to be proxied before they're forwarded to the landing-page. In this case it is up to the middleware server to take care of the following:
1. Capture and set the user-agent​
When a request is forwarded, set the http-header User-Agent
to that of tthe incoming request
This is needed to get the right app / user-agent to display in the dashboard
2. Set the forwarding header​
When a request is forwarded, set the http-header X-Forwarded-For
to the client-IP address of tthe incoming request.
The newer header forwarded: for={client-ip}
is also supported.
This is needed to get the right ip-address to display in the dashboard; in case the location-update API is not called on the client-side, this is the only way to get data about the location of the user.