Fix 401 unauthorized issue while accessing apidoc 79/14379/1
authorRavi Pendurty <ravi.pendurty@highstreet-technologies.com>
Thu, 8 May 2025 05:29:48 +0000 (10:59 +0530)
committerRavi Pendurty <ravi.pendurty@highstreet-technologies.com>
Thu, 8 May 2025 05:30:15 +0000 (11:00 +0530)
Issue-ID: OAM-454
Change-Id: I71927e095c0fb019abf590a5152bd1fae0626f4f
Signed-off-by: Ravi Pendurty <ravi.pendurty@highstreet-technologies.com>
solution/smo/oam/odlux/location.rules

index 97a3541..f4bd582 100644 (file)
@@ -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
+}