Under what conditions are HTTP request headers removed by proxies?

后端 未结 2 1274
既然无缘
既然无缘 2021-01-05 00:41

I\'m looking at various methods of RESTfully versioning APIs, and there are three major contenders. I believe I\'ve all but settled on using X-API-Version. Pu

2条回答
  •  北海茫月
    2021-01-05 01:39

    This isn't an answer per se, but rather a mention of real-world scenario.

    My current environment uses a mixed CAS/AD solution in order to allow SSO across several different platforms (classic ASP, ASP.NET, J2EE, you name it).

    Recently we identified some issues - part of the solution involves aggregating Auth tokens to HTTP headers whenever necessary to propagate credentials. One specific solution, making considerable heavy usage of cookies, was chained with an nginx implementation, whose HTTP header limit was set to 4KiB. If the cookie payload went over 2KiB, it would start leaking out headers.

    Consequently, applications that had some sort of state/scope control being coordinated via HTTP headers (session cookies included) suddenly started behaving erratically.

    On an interesting, related note, REST services using URL versioning (http://server/api/vX.X/resource, for example) were unaffected.

提交回复
热议问题