From 487a4e825e0daa45e62995383ea46423d27c86f4 Mon Sep 17 00:00:00 2001 From: Jan-Piet Mens Date: Fri, 19 Feb 2016 16:57:03 +0100 Subject: [PATCH] nginx proxy snippet for httppub mode --- README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/README.md b/README.md index e00f8f6..ebec156 100644 --- a/README.md +++ b/README.md @@ -883,6 +883,24 @@ The content of the request is used by the Recorder as though it had arrived as a If the Recorder is compiled without specifying `WITH_MQTT` at build time, support for MQTT is disabled completely. +### Authentication + +In HTTP mode, the Recorder provides no form of authentication; anybody who "stumbles" over the correct endpoint will be able to post location data to your Recorder! You do not want this to happen. + +Install, say, an _nginx_ proxy before it and ensure it's configured for HTTP basic authentication: + +``` +# - Recorder PUB ----------------------------------------------------------- +location /owntracks/pub { + auth_basic "OwnTracks pub"; + auth_basic_user_file /usr/local/etc/nginx/owntracks.htpasswd; + proxy_pass http://127.0.0.1:8083/pub; + proxy_http_version 1.1; + proxy_set_header Host $host; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; +} +``` + ## Advanced topics ### The LMDB database