This page is for the administrator or network team that places an onsite EvTrack server behind a reverse proxy or a web application firewall (WAF). It lists the paths visitors need, the headers the proxy must send and why the proxy has to be the only way to reach the server. A proxy or firewall adds a layer of protection. It does not replace keeping the server and its software up to date.
How to publish the server
The EvTrack web service listens on TCP port 5443. Point the proxy at that port and let users reach EvTrack only through the proxy. If HTTPS is switched on for the server (see HTTPS Configuration), the proxy must connect to it over https. Allow connections to port 5443 from the proxy alone, not from the internet and not from the rest of your network. EvTrack accepts the headers described below from whatever connects to it, so anything else that can reach the port can pretend to be the proxy.
The address users type is the proxy’s address. Enter it as the App Base URL, so the links EvTrack puts in emails and messages lead to the proxy.
Restrict the portal to your own network
Visitors register from their own phones and computers, so a few paths have to be reachable from anywhere. Nothing else does. Set the proxy or firewall up with two rules, in this order:
- Allow the paths in the table below from any address.
- Restrict every other path (
/**) to your organisation’s own IP address ranges.
Write the second rule as “everything else”, not as a list of paths to block. A path added by a later EvTrack release is then restricted from the day you upgrade.
Paths visitors need
| Path pattern | Methods | Purpose |
|---|---|---|
/r/** | GET, POST | Visitor self-registration, including sign-in codes and photo or document uploads |
/i/** | GET | Invitation pages opened from an invite email or message |
/q/** | GET | QR code images shown on invitations and passes |
/resources/** | GET | Style sheets, scripts and images |
/webjars/** | GET | Script libraries |
/files/theme/** | GET | Your logo and branding |
In these patterns ** matches any number of path segments. Some products use a single * for one segment only. A rule written as /r/* then allows /r/register but blocks the deeper addresses used for uploads and for the sign-in step, and registration fails part of the way through. Use whatever your product offers for “this path and everything beneath it”.
Headers the proxy must send
| Header | Value |
|---|---|
X-Forwarded-For | The address of the visitor’s or user’s device. The proxy must replace this header with the address it sees. Adding to a value that arrived with the request is not enough, because EvTrack uses the first address in the list. |
X-Forwarded-Proto | https |
X-Forwarded-Host | The host name users typed, for example visitors.example.com |
X-Forwarded-Port | The port users connect to, when it is not 443 |
EvTrack limits sign-in attempts, new sessions and registration requests for each client address. Without the real address in X-Forwarded-For, every visitor appears to come from the proxy and they all share one allowance. Once it is used up, visitors see an HTTP 429 “Too Many Requests” error. Without X-Forwarded-Proto, EvTrack believes the connection is plain http. Addresses it builds, such as single sign-on addresses or the return to a page after signing in, can then point to an http address that does not load.
Why the proxy must be the only way in
An onsite server accepts these headers from whatever connects to it. It has no list of proxies it trusts. Two things follow:
- Only the proxy may reach port 5443. A device that connects to the server directly can send any
X-Forwarded-Forvalue it likes. It could then dodge the limits above, and the address recorded for its sign-in would be false. - The proxy must replace the headers, not pass them on. A value a visitor sends is then discarded at the proxy and never reaches EvTrack.
If the server has no proxy in front of it at all, for example an installation used only inside one building, set server.forward-headers-strategy=none in the server’s application.properties file and restart the EvTrack service. The server then ignores these headers.
Other proxy settings
- Request size - allow request bodies of up to 20 MB. Visitors upload photos and identity documents while registering.
- Streaming responses - do not buffer long-lived responses. Some screens wait on an open connection for an update, such as a kiosk waiting for a host to approve a visit.
Check the result
From a device outside your allowed address ranges, for example a phone on mobile data:
- A self-registration link opens and can be completed, including a photo upload.
- The sign-in page at
/loginis refused by the proxy. - The sign-in page is still refused when the request carries its own
X-Forwarded-Forheader set to one of your internal addresses. The restriction must use the address the proxy sees, not a header the visitor supplied. - Port 5443 on the server does not answer.
From a computer inside your network:
- You can sign in, and the address bar stays on
httpsthroughout.