diff --git a/README.md b/README.md index 22f1baa..c4e9bda 100644 --- a/README.md +++ b/README.md @@ -6,8 +6,10 @@ * agent1.swagger.localhost (Administration API(s) with swagger UI) * agent2.localhost (Agent2 service endpoint) * agent2.swagger.localhost (Administration API(s) with swagger UI) + * agent3.swagger.localhost (Administration API(s) with swagger UI) * agent1.webhook (For capturing webhook events) * agent2.webhook (For capturing webhook events) + * agent3.webhook (For capturing webhook events) *Notes* : By default the agents are pointed to indy ledger hosted at https://indy.igrant.io, You can always change this to your ledger of choice by updating *GENESIS_URL* environment variable in docker-compose.yml file @@ -18,6 +20,7 @@ A webhook interceptor is provided to debug the webhook events. It can be accesse 1. `docker exec -it agent1.webhook tail -f demo.log` - For viewing webhook events for agent1 2. `docker exec -it agent2.webhook tail -f demo.log` - For viewing webhook events for agent2 +3. `docker exec -it agent2.webhook tail -f demo.log` - For viewing webhook events for agent2 #### Configuring the agent startup diff --git a/nginx/conf.d/acapy.conf b/nginx/conf.d/acapy.conf index e7bafb3..230c71d 100644 --- a/nginx/conf.d/acapy.conf +++ b/nginx/conf.d/acapy.conf @@ -57,3 +57,33 @@ server { add_header 'Access-Control-Allow-Methods' 'GET,POST,OPTIONS,PUT,DELETE,PATCH'; } } + +server { + listen 80; + listen [::]:80; + server_name agent3.localhost; + + location / { + proxy_pass http://agent3.localhost; + + add_header 'Access-Control-Allow-Origin' '*'; + add_header 'Access-Control-Allow-Credentials' 'true'; + add_header 'Access-Control-Allow-Headers' '*'; + add_header 'Access-Control-Allow-Methods' 'GET,POST,OPTIONS,PUT,DELETE,PATCH'; + } +} + +server { + listen 80; + listen [::]:80; + server_name agent3.swagger.localhost; + + location / { + proxy_pass http://agent3.localhost:8001; + + add_header 'Access-Control-Allow-Origin' '*'; + add_header 'Access-Control-Allow-Credentials' 'true'; + add_header 'Access-Control-Allow-Headers' '*'; + add_header 'Access-Control-Allow-Methods' 'GET,POST,OPTIONS,PUT,DELETE,PATCH'; + } +} diff --git a/nginx/conf.d/acapy.template b/nginx/conf.d/acapy.template index e7bafb3..230c71d 100644 --- a/nginx/conf.d/acapy.template +++ b/nginx/conf.d/acapy.template @@ -57,3 +57,33 @@ server { add_header 'Access-Control-Allow-Methods' 'GET,POST,OPTIONS,PUT,DELETE,PATCH'; } } + +server { + listen 80; + listen [::]:80; + server_name agent3.localhost; + + location / { + proxy_pass http://agent3.localhost; + + add_header 'Access-Control-Allow-Origin' '*'; + add_header 'Access-Control-Allow-Credentials' 'true'; + add_header 'Access-Control-Allow-Headers' '*'; + add_header 'Access-Control-Allow-Methods' 'GET,POST,OPTIONS,PUT,DELETE,PATCH'; + } +} + +server { + listen 80; + listen [::]:80; + server_name agent3.swagger.localhost; + + location / { + proxy_pass http://agent3.localhost:8001; + + add_header 'Access-Control-Allow-Origin' '*'; + add_header 'Access-Control-Allow-Credentials' 'true'; + add_header 'Access-Control-Allow-Headers' '*'; + add_header 'Access-Control-Allow-Methods' 'GET,POST,OPTIONS,PUT,DELETE,PATCH'; + } +}