Proxy for all internet traffic to and from rek.ai
Proxy for all internet traffic to and from rek.ai
Rek.ai supports a full proxy setup for all traffic between your website and our services.
Instead of the visitor’s browser communicating directly with rek.ai, all requests first pass through an endpoint hosted on your own server. This endpoint receives each GET and POST request and forwards it securely to rek.ai, then returns the response back to the website.
This architecture means rek.ai only receives traffic from your server environment. We do not receive or process the end user’s IP address, since all communication appears to come from a single controlled source.
Benefits include:
- No direct browser connection to rek.ai
- End user IP addresses are never exposed to rek.ai
- All traffic routed through your own infrastructure
- Centralized control, logging, and filtering of requests
- Full ability to inspect, control, remove, or update individual request parameters before forwarding traffic to rek.ai
Setup in the proxy
The proxy code running on your server should determine whether the incoming request is a GET or POST request. If the request is a GET, it should be forwarded as a GET request to https://predict.rekai.se/predict (opens in a new tab). If the request is a POST, it should be forwarded as a POST request to https://view.rekai.se/view (opens in a new tab).
Depending on your server environment and outbound firewall rules, you may need to allow connections from your server to the following hosts:
- view.rekai.se resolves to 89.42.141.228
- predict.rekai.se resolves to 89.42.141.228
Full control of request parameters before forwarding
Both GET and POST requests can be unpacked and inspected on your server before they are forwarded to rek.ai. This makes it possible to override, remove, validate, or update individual parameters in the request payload or query string before the traffic is sent to our backend. In practice, this gives you full control over what data is forwarded and allows you to enforce internal rules, privacy requirements, or custom business logic within your own infrastructure.
Forward responses directly to the frontend
Responses returned from rek.ai to your proxy can normally be passed directly back to the frontend without being unpacked, modified, or transformed. Your proxy simply acts as an intermediary layer that receives the response from rek.ai and returns it to the browser. This keeps the implementation simple while still allowing you to retain full control over inbound traffic and network routing.
To start using a proxy current settings is done on each page
In order for all requests to go through your proxy, you need to enter the addresses in an object.
<script>
window.rek_customsettings = window.rek_customsettings || {};
window.rek_customsettings.proxypredict = '/rest-api/rekproxy/';
window.rek_customsettings.proxyview = '/rest-api/rekproxy/';
</script>