From: Ravi Pendurty Date: Thu, 8 May 2025 05:29:48 +0000 (+0530) Subject: Fix 401 unauthorized issue while accessing apidoc X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;h=f4d1211d417ef9239470803c89c7ccf45fdd9134;p=oam.git Fix 401 unauthorized issue while accessing apidoc Issue-ID: OAM-454 Change-Id: I71927e095c0fb019abf590a5152bd1fae0626f4f Signed-off-by: Ravi Pendurty --- diff --git a/solution/smo/oam/odlux/location.rules b/solution/smo/oam/odlux/location.rules index 97a3541..f4bd582 100644 --- a/solution/smo/oam/odlux/location.rules +++ b/solution/smo/oam/odlux/location.rules @@ -29,6 +29,16 @@ location /websocket { proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; } +location /apidoc/ { + proxy_pass http://controller:8181; + + # Inject Authorization header + proxy_set_header Authorization "Bearer $cookie_token"; + # + # Optional CORS settings + #add_header Access-Control-Allow-Origin *; + add_header Access-Control-Allow-Headers Authorization,Content-Type; +} location @backend { proxy_pass http://controller:8181; -} \ No newline at end of file +}