Skip to content

Commit a6506f1

Browse files
authored
nginx: Support query params & fix OPCS-4 port conflict (#35)
* Include query params when passing to upstream * Use new port for OPCS-4 to avoid ICD-10 conflict Signed-off-by: Phoevos Kalemkeris <phoevos.kalemkeris@ucl.ac.uk>
1 parent e323f93 commit a6506f1

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

docker/nginx/etc/nginx/nginx.conf

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,14 @@ http {
4848
include cors.conf;
4949
resolver 127.0.0.11 valid=30s;
5050
set $upstream $service:8000;
51+
set $path $subpath;
52+
if ($subpath = "") {
53+
set $path /;
54+
}
55+
set $query_string_part "";
56+
if ($is_args) {
57+
set $query_string_part $is_args$args;
58+
}
5159

5260
# FIXME: Access web interfaces (e.g. Grafana, MLflow) through subpaths on the proxy.
5361
# The following services only work when accessed directly through their respective APIs.
@@ -76,7 +84,7 @@ http {
7684
set $upstream $service:9090;
7785
}
7886

79-
proxy_pass http://$upstream$subpath;
87+
proxy_pass http://$upstream$path$query_string_part;
8088

8189
proxy_redirect http://$upstream$subpath $scheme://$host/cms/$service$subpath;
8290
proxy_redirect http://$upstream/ $scheme://$host/cms/$service/;

docker/nginx/etc/nginx/sites-enabled/medcat-opcs4

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
server {
2-
listen 28181 ssl http2 default_server;
3-
listen [::]:28181 ssl http2 default_server;
2+
listen 28182 ssl http2 default_server;
3+
listen [::]:28182 ssl http2 default_server;
44
server_name localhost;
55

66
add_header Strict-Transport-Security "max-age=31536000" always;

0 commit comments

Comments
 (0)