Skip to content

Instantly share code, notes, and snippets.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@oliverheilig
oliverheilig / !LINK.md
Last active January 13, 2023 10:36
xServer-2 Data Integration Strategies
@oliverheilig
oliverheilig / !LINK.md
Last active February 17, 2025 16:39
In Defense of Mercator

Hiding your xServer internet token

The xServer internet token is an API-key used to authenticate and bill the requests.

If a client-application accesses xServer internet directly, the token can be sniffed by intercepting the traffic or looking into the code. However, the API-key cannot be used to access any security relevant customer data. If you don’t want to expose the token to the client, you can proxy the xServer internet access in your application server and inject your token here.

Here are two scenarios to create a proxy that injects an xServer internet token.

1. Use Apache as Proxy

You can add a virtual host to proxy your xServer-Requests, by configuring the httpd-vhosts.conf. The xServer can be acessesed with the authentication of your WebServer then, while the requests are relayed and the token is injected.

@oliverheilig
oliverheilig / lux_postcode.topo.json
Created August 19, 2015 14:19
Luxembourg postcodes as TopoJson
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@oliverheilig
oliverheilig / lux_communes.topo.json
Created August 19, 2015 13:32
Luxmenbourg municipalities as TopoJson
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
// Calcluate airline distance for two mercator points.
// This approximation formula is sufficiently accurate for
// our needs for distances of up to 600 km and
// 80° latitude (the error is never more than 5% even for extreme values).
using System;
public class Program
{
public static void Main()
{
@oliverheilig
oliverheilig / TALux.geojson
Last active August 29, 2015 14:04
Truck Attributes as GeoJson
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.