From dd0b547282f85ae2ad8b0fdba4dd526f7851915c Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Thu, 11 Nov 2021 16:08:04 +0100 Subject: [PATCH] Fix HTTP 415 unsupported media bug (#156) --- traccar/config.yaml | 1 - traccar/rootfs/etc/nginx/templates/ingress.gtpl | 9 ++++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/traccar/config.yaml b/traccar/config.yaml index 55294c7..b44a12e 100644 --- a/traccar/config.yaml +++ b/traccar/config.yaml @@ -6,7 +6,6 @@ description: Modern GPS Tracking Platform url: https://github.com/hassio-addons/addon-traccar ingress: true ingress_port: 0 -ingress_stream: true panel_icon: mdi:car-connected startup: services arch: diff --git a/traccar/rootfs/etc/nginx/templates/ingress.gtpl b/traccar/rootfs/etc/nginx/templates/ingress.gtpl index a737c35..d03deff 100644 --- a/traccar/rootfs/etc/nginx/templates/ingress.gtpl +++ b/traccar/rootfs/etc/nginx/templates/ingress.gtpl @@ -7,10 +7,13 @@ server { allow 172.30.32.2; deny all; - location / { - allow 172.30.32.2; - deny all; + location ~* /session$ { + proxy_set_header Content-Type application/x-www-form-urlencoded; + proxy_pass http://backend; + } + location / { + proxy_set_header Content-Type application/json; proxy_pass http://backend; } }