#proxy giving 401

7 messages · Page 1 of 1 (latest)

heavy olive
#

When I call /api/proxy/someurl with authorization headers with backstage token, it is giving me 401 unauthorized. I tried using dangerously-allow-unauthenticated, but that did not help. Does anyone have any idea how to fix it? I'm on 1.29.2.

novel locust
#

@heavy olive did you solve that? I believe I may be running into the same issue.

regal abyss
#

I believe that the proxy has passed the request fine but that the external api you're trying to call is returning a 401. Could you try the credentials you use for backstage in postman to check if they're working? Also could you provide your proxy config?

fluid jackal
#

i am also facing the similar issue.. actual api works fine with the credentials, but via backstage proxy i am getting 401
proxy:
'/api':
target: 'http://localhost:7007' # Use the backend container’s URL
changeOrigin: true
/deploy-app:
target: http://172.29.0.3:4516/
changeOrigin: true
headers:
Authorization: Basic YWRtaW46YWRtaW4=

#

it is happening only when we run the backstage in docker container, standalone instance working as expected

weary widget
#

What is your docker network? Sometimes ive seem these failures when the subnet of the docker network overlaps with external IPs

fluid jackal
#

i have create the new network dai-backstage with driver bridge