Add version endpoint to nginx configuration (#316)
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
This commit is contained in:
parent
1d75268ffa
commit
c38a032fa5
|
@ -153,6 +153,22 @@ http {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
location /version {
|
||||||
|
proxy_redirect off;
|
||||||
|
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 X-Forwarded-Proto $scheme;
|
||||||
|
proxy_pass http://things:8182;
|
||||||
|
|
||||||
|
# Allow OPTIONS method CORS
|
||||||
|
if ($request_method = OPTIONS ) {
|
||||||
|
add_header Content-Length 0;
|
||||||
|
add_header Content-Type text/plain;
|
||||||
|
return 200;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
# Proxy pass to mainflux-http-adapter
|
# Proxy pass to mainflux-http-adapter
|
||||||
location /http/ {
|
location /http/ {
|
||||||
proxy_redirect off;
|
proxy_redirect off;
|
||||||
|
|
Loading…
Reference in New Issue