Initial Commit, Everything is working fine
This commit is contained in:
33
nginx/proxy.conf
Normal file
33
nginx/proxy.conf
Normal file
@@ -0,0 +1,33 @@
|
||||
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
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user