20 lines
742 B
Nginx Configuration File
20 lines
742 B
Nginx Configuration File
|
|
server {
|
||
|
|
listen 8334;
|
||
|
|
server_name _;
|
||
|
|
root /usr/share/nginx/html;
|
||
|
|
index index.html;
|
||
|
|
location /bitcoin-rpc/ {
|
||
|
|
proxy_pass http://127.0.0.1:8332/;
|
||
|
|
proxy_http_version 1.1;
|
||
|
|
proxy_set_header Host $host;
|
||
|
|
proxy_set_header X-Real-IP $remote_addr;
|
||
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||
|
|
proxy_set_header Authorization "Basic __BITCOIN_RPC_AUTH__";
|
||
|
|
add_header Access-Control-Allow-Origin *;
|
||
|
|
add_header Access-Control-Allow-Methods "POST, GET, OPTIONS";
|
||
|
|
add_header Access-Control-Allow-Headers "Content-Type, Authorization";
|
||
|
|
if ($request_method = OPTIONS) { return 204; }
|
||
|
|
}
|
||
|
|
location / { try_files $uri $uri/ /index.html; }
|
||
|
|
}
|