From d9a71a04b1478e8ab1ec871b25c8bf043f3a85f7 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Mon, 28 Nov 2022 00:07:45 +0100 Subject: add a minimal working version --- etc/nginx/conf.d/default.conf | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 etc/nginx/conf.d/default.conf (limited to 'etc/nginx/conf.d') diff --git a/etc/nginx/conf.d/default.conf b/etc/nginx/conf.d/default.conf new file mode 100644 index 0000000..176010f --- /dev/null +++ b/etc/nginx/conf.d/default.conf @@ -0,0 +1,22 @@ +upstream backend { + server 192.168.177.1:1234; +} + +server { + listen 80; + listen [::]:80; + + root /usr/share/nginx/html; + + location / { + index index.html; + } + + location ~ ^/api/(?ListPeers|GetDeviceInfo)$ { + proxy_set_header Content-Type application/json; + proxy_set_header Referer ""; + proxy_method POST; + proxy_set_body '{"jsonrpc": "2.0", "method": "$rpc_method", "params": {}}'; + proxy_pass http://backend; + } +} -- cgit v1.2.3