Merge pull request #9 from nemchik/ombi-api

Add actual ombi api
This commit is contained in:
aptalca 2018-12-20 11:27:02 -05:00 committed by GitHub
commit 071d541a74
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 21 additions and 0 deletions

View file

@ -28,6 +28,15 @@ server {
proxy_pass http://$upstream_ombi:3579; proxy_pass http://$upstream_ombi:3579;
} }
# This allows access to the actual api
location ~ (/ombi)?/api {
include /config/nginx/proxy.conf;
resolver 127.0.0.11 valid=30s;
set $upstream_ombi ombi;
proxy_pass http://$upstream_ombi:3579;
}
# This allows access to the documentation for the api
location ~ (/ombi)?/swagger { location ~ (/ombi)?/swagger {
include /config/nginx/proxy.conf; include /config/nginx/proxy.conf;
resolver 127.0.0.11 valid=30s; resolver 127.0.0.11 valid=30s;

View file

@ -19,6 +19,18 @@ location ^~ /ombi/ {
proxy_pass http://$upstream_ombi:3579; proxy_pass http://$upstream_ombi:3579;
} }
# This allows access to the actual api
location ^~ /ombi/api {
include /config/nginx/proxy.conf;
resolver 127.0.0.11 valid=30s;
set $upstream_ombi ombi;
proxy_pass http://$upstream_ombi:3579;
}
if ($http_referer ~* /ombi) {
rewrite ^/api/(.*) /ombi/api/$1? redirect;
}
# This allows access to the documentation for the api
location ^~ /ombi/swagger { location ^~ /ombi/swagger {
include /config/nginx/proxy.conf; include /config/nginx/proxy.conf;
resolver 127.0.0.11 valid=30s; resolver 127.0.0.11 valid=30s;