31 lines
845 B
Plaintext
31 lines
845 B
Plaintext
server {
|
|
listen 80;
|
|
listen [::]:80;
|
|
server_name localhost;
|
|
|
|
error_page 500 502 503 504 /50x.html;
|
|
location = /50x.html {
|
|
root /usr/share/nginx/html;
|
|
}
|
|
|
|
location ~ ^/v1/([^/]*)$ {
|
|
set $apiKey $1;
|
|
auth_request /auth;
|
|
proxy_buffering off;
|
|
rewrite /.*$ / break;
|
|
proxy_pass http://fixturenet-eth-geth-1:8545;
|
|
}
|
|
|
|
location = /auth {
|
|
internal;
|
|
proxy_buffering off;
|
|
resolver 127.0.0.11 ipv6=off;
|
|
proxy_pass http://keycloak:8080/auth/realms/cerc/check?apiKey=$apiKey;
|
|
proxy_pass_request_body off;
|
|
proxy_set_header Content-Length "";
|
|
proxy_set_header X-Original-URI $request_uri;
|
|
proxy_set_header X-Original-Remote-Addr $remote_addr;
|
|
proxy_set_header X-Original-Host $host;
|
|
}
|
|
}
|