33 lines
923 B
Plaintext
33 lines
923 B
Plaintext
http {
|
|
|
|
# Leader-Service-Proxy
|
|
server {
|
|
# TODO: Change IP to a well defined one
|
|
listen *:80; # This is for testing purposes ONLY, to be changed to 443
|
|
server_name "nginx-mediator.internal";
|
|
|
|
location / {
|
|
|
|
proxy_pass "http://leader-service.internal";
|
|
proxy_pass_request_headers on;
|
|
proxy_pass_request_body on;
|
|
|
|
proxy_set_header X-Forwarded-For $sent_http_x_iot_ip; # X-IoT-IP
|
|
}
|
|
}
|
|
|
|
# IoT-Simulator Proxy
|
|
server {
|
|
listen *:80; # This is for testing purposes ONLY, to be changed to 443
|
|
|
|
location / {
|
|
|
|
proxy_pass "http://iot-simulator.internal";
|
|
proxy_pass_request_headers on;
|
|
proxy_pass_request_body on;
|
|
|
|
proxy_set_header X-Forwarded-Host $sent_http_x_iot_ip; # Set forwarded host to keep the original IP request
|
|
|
|
}
|
|
}
|
|
} |