HttpRequest标题“X-Forwarded-Proto”丢失了 [英] HttpRequest header “X-Forwarded-Proto” missing

查看:1951
本文介绍了HttpRequest标题“X-Forwarded-Proto”丢失了的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个IIS ASP.NET Web应用程序的负载均衡器,它将所有 https 请求转发为 http 。因此,我们需要 X-Forwarded-Proto 标头来识别https。
我能看到 X-Forwarded-For 标题,但不是 Proto

We have a load balancer for IIS ASP.NET Web Application which forwards all the https requests as http . Hence we required the X-Forwarded-Proto header to identify https. I'm able to see X-Forwarded-For header but not the Proto.

我正在办理 Request.Headers

是否有遗失的东西或知道原始请求的其他选择是https?

Is there something missing or any alternative to know the original request was https ?

推荐答案

X-Forwarded-Proto 标头由Load Balancer通过 IRule 显式设置。由于 IRule 未被应用 X-Forwarded-Proto 标头丢失。

X-Forwarded-Proto header is explicitly set by the Load Balancer through IRule. As the IRule was not being applied X-Forwarded-Proto header was missing.

这篇关于HttpRequest标题“X-Forwarded-Proto”丢失了的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆