Authorization header not getting passed to the backend

DeYung Q. Le 0 Reputation points
2024-09-15T05:28:15.0233333+00:00

We have an Angular app that authenticates to our backend. Works in our own environment and locally but once it's deployed, the authorization header is removed. I've changed the authorization header to x-authorization and still no headers making it to the backend. We have the backend deployed as a container app, still doesn't work linked or unlinked to the static web app.

Azure Static Web Apps
Azure Static Web Apps
An Azure service that provides streamlined full-stack web app development.
1,094 questions
{count} votes

1 answer

Sort by: Most helpful
  1. ajkuma 28,041 Reputation points Microsoft Employee
    2024-09-16T19:24:53.97+00:00

    Based on my understanding of your issue description, you may check if the authorization header is being set correctly in your Angular app. You may do this by using the browser's developer tools to inspect the network traffic and see if the header is present in the request.

    Kindly ensure if the backend is configured to accept the x-authorization header.

    If you haven't checked, please checkout the docs:

    Configure Azure Static Web Apps | configuration#routes
    Authenticate and authorize Static Web Apps

    Kindly let us know, I'll follow-up with you further.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.