Paweł Ruciński
Paweł Ruciński

Reputation: 68

Add Proxy-Authorization header in swagger

I need to add specific header on swagger ui using .net core. Is there any way to include header like this?

Already tried:

Both didn't work. When I change header name everything work fine, but this specific header is wiped out from a call.

Did you ever meet this issue? How to solve this?

Upvotes: 2

Views: 1124

Answers (1)

Helder Sepulveda
Helder Sepulveda

Reputation: 17594

From: https://developer.mozilla.org/en-US/docs/Glossary/Forbidden_header_name

A forbidden header name is an HTTP header name that cannot be modified programmatically; specifically, an HTTP request header name.

...

Forbidden header names start with Proxy- or Sec-, or consist of one of these:

  • Accept-Charset
  • Accept-Encoding
  • Access-Control-Request-Headers
  • Access-Control-Request-Method
  • Connection
  • Content-Length
  • Cookie
  • Cookie2
  • Date
  • DNT
  • Expect
  • Host
  • Keep-Alive
  • Origin
  • Proxy-
  • Sec-
  • Referer
  • TE
  • Trailer
  • Transfer-Encoding
  • Upgrade
  • Via

Upvotes: 2

Related Questions