Azure Static WebbApp staticwebapp.config.json GlobalHeaders are not updating.

Joel Cox 6 Reputation points
2021-05-14T05:19:20.207+00:00

I am having an issue updating my globalHeaders in my config.json.

I have updated and pushed the new headers, but I continue to show the same headers as before? Is there any way I can force static webapps to use the new config.json.

I am also running this as a PWA, I am not sure if that effects whether the update will be propagated.

I have checked https://securityheaders.com/ with my website as well, and the headers are still not updating.

Azure Static Web Apps
Azure Static Web Apps
An Azure service that provides streamlined full-stack web app development.
904 questions
{count} vote

1 answer

Sort by: Most helpful
  1. SnehaAgrawal-MSFT 21,426 Reputation points
    2021-05-17T13:24:19.13+00:00

    Thanks for asking question! Just to confirm how are you updating globalHeaders? The globalHeaders section provides a set of HTTP headers applied to each response, unless overridden by a route header rule, otherwise the union of both the headers from the route and the global headers is returned.

    See the example configuration file for usage examples.

    Let us know if issue remains.

    0 comments No comments

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.