diff --git a/README.md b/README.md index 7864c83..8c32bc4 100644 --- a/README.md +++ b/README.md @@ -186,6 +186,7 @@ In order to build an image you need to: ``` docker run -d \ --name \ + -p 80:80 \ -p 443:443 \ --mount type=bind,source="$(pwd)"/open_banking_certs/,target=/app/open_banking_certs/ \ --mount type=bind,source="$(pwd)"/broker_tls/,target=/app/broker_tls/ \ @@ -213,6 +214,7 @@ folder. For example: ``` docker run -d \ --name \ + -p 80:80 \ -p 443:443 \ --mount type=bind,source="$(pwd)"/open_banking_certs/,target=/app/open_banking_certs/ \ --mount type=bind,source="$(pwd)"/broker_tls/,target=/app/broker_tls/ \ @@ -313,8 +315,7 @@ read from the file system, which can be changed if necessary by changing corresp in the `ServicePlatform` class. Implementation of secured access to the service (using client TLS certificate verification) relies on -[nginx](https://nginx.org/). Please refer to [nginx.conf](nginx.conf). *Please notice that this -configuration uses port 443 for secured connections.* +[nginx](https://nginx.org/). Please refer to [nginx.conf](nginx.conf). ### Running service locally without Docker diff --git a/app/tests/integration_test.py b/app/tests/integration_test.py index a134c28..7cb0a3d 100644 --- a/app/tests/integration_test.py +++ b/app/tests/integration_test.py @@ -8,6 +8,12 @@ def test_health(): + # health check is expected to be available over HTTP + broker_origin = config.BROKER_ORIGIN.replace("https://", "http://") + response = requests.get(broker_origin + "/health") + assert response.status_code == 200 + assert response.text == '{"result":"ok"}' + response = requests.get(config.BROKER_ORIGIN + "/health", verify=False) assert response.status_code == 200 assert response.text == '{"result":"ok"}' diff --git a/nginx.conf b/nginx.conf index bdd40fe..32863e9 100644 --- a/nginx.conf +++ b/nginx.conf @@ -1,4 +1,5 @@ server { + listen 80; listen 443 ssl; server_name localhost; ssl_certificate /app/broker_tls/server.crt;