blob: 176010f0993d3ee9f7ace76f895f77b4f885a8a2 (
plain) (
tree)
|
|
upstream backend {
server 192.168.177.1:1234;
}
server {
listen 80;
listen [::]:80;
root /usr/share/nginx/html;
location / {
index index.html;
}
location ~ ^/api/(?<rpc_method>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;
}
}
|