Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new chapter about proxy server and custom headers #162

Open
wants to merge 3 commits into
base: vNext
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 14 additions & 0 deletions Guidelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ This document establishes the guidelines Microsoft REST APIs SHOULD follow so RE
- [7.5. Standard request headers](#75-standard-request-headers)
- [7.6. Standard response headers](#76-standard-response-headers)
- [7.7. Custom headers](#77-custom-headers)
- [7.7.1 Proxy server and custom headers](#771-proxy-server-and-custom-headers)
- [7.8. Specifying headers as query parameters](#78-specifying-headers-as-query-parameters)
- [7.9. PII parameters](#79-pii-parameters)
- [7.10. Response formats](#710-response-formats)
Expand Down Expand Up @@ -441,6 +442,19 @@ Headers that are not standard HTTP headers MUST have one of two formats:

These two formats are described below.

#### 7.7.1 Proxy server and custom headers

One of the reasons why custom headers are not advised to be used are certain company restrictions.
Even if the implementation is clear to developers and all customers are using the provided custom headers correctly,
once it is installed in production it might cause unexpected issues.

Companies are often filtering the incoming or outgoing requests via proxy server which can be configured
in such a way that requests get changed or even manipulated.
Custom headers are a common case to get filtered even though they are not meant to be.

Avoiding custom headers for basic operations is an easy way to prevent getting into this situation in the first place.
This should always be considered in the designing process.

### 7.8. Specifying headers as query parameters
Some headers pose challenges for some scenarios such as AJAX clients, especially when making cross-domain calls where adding headers MAY not be supported.
As such, some headers MAY be accepted as Query Parameters in addition to headers, with the same naming as the header:
Expand Down