From 4b04aa7cd9fe0eab48a7d6da4128966ea1f37702 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A2u=20Cao?= Date: Wed, 24 Jan 2024 16:19:04 +0300 Subject: [PATCH] Let akkounts API proxy forward all API requests ... instead of just a specific subdirectory/path --- .../kosmos-akkounts/templates/nginx_conf_akkounts_api.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/site-cookbooks/kosmos-akkounts/templates/nginx_conf_akkounts_api.erb b/site-cookbooks/kosmos-akkounts/templates/nginx_conf_akkounts_api.erb index 945de09..02e1112 100644 --- a/site-cookbooks/kosmos-akkounts/templates/nginx_conf_akkounts_api.erb +++ b/site-cookbooks/kosmos-akkounts/templates/nginx_conf_akkounts_api.erb @@ -18,7 +18,7 @@ server { access_log <%= node[:openresty][:log_dir] %>/<%= @domain %>.access.log json; error_log <%= node[:openresty][:log_dir] %>/<%= @domain %>.error.log warn; - location /kredits/ { + location / { add_header 'Access-Control-Allow-Origin' '*' always; add_header 'Access-Control-Allow-Methods' 'GET' always; add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range' always; @@ -31,6 +31,6 @@ server { proxy_buffers 1024 8k; proxy_http_version 1.1; - proxy_pass http://_akkounts_api/api/kredits/; + proxy_pass http://_akkounts_api/api/; } }