Share via

Custom headers in Azure API Management for CSP

Ryan 21 Reputation points
30 June 2020, 12:00 pm

In Azure API Management, there is a section to add policies. It seems that we can only add built-in policies. We are looking to add a Content Security Policy (CSP) header just like on our Azure Web app.

CSP Reference: https://content-security-policy.com/

Is it possible to add such custom http header?

Regards,

Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
2,335 questions
{count} votes

Accepted answer
  1. Pramod Valavala 20,656 Reputation points Microsoft Employee
    1 July 2020, 7:01 am

    This is possible. You simply need to use the set-header policy in your outbound policy block to set the appropriate CSP headers required.

    You can read more about policies in APIM for more insights on how policies work.


0 additional answers

Sort by: Most helpful

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.