为什么 AppHarbor + RequireHttpsAttribute 等于 frny-face :(
今天首次部署到 AppHarbor。经过一些初步的构建工作后,我成功部署了一个 MVC3 应用程序。
但使用 RequireHttpsAttribute 存在问题。我一开始注意到 http 页面工作正常,但 https 页面出现错误,表明该网页有重定向循环。
我一直想要整个应用程序都需要 https,所以我在 global.asax 中添加了一个全局 RequireHttpsAttribute 过滤器。现在,在 Chrome 和 FF 中,每个页面都会遇到重定向循环错误。
假设这与幕后的端口重定向有关。如何修复它?我需要自定义 RequireHttpsAttribute 吗?
First deployment to AppHarbor today. After some initial work getting it to build, I successfully deployed an MVC3 app.
There is a problem with using the RequireHttpsAttribute though. I noticed at first that http pages were working fine, but https pages were getting the error that the web page has a redirect loop.
I have been meaning to require https for the entire app, so I went and added a global RequireHttpsAttribute filter in global.asax. Now every single page is getting the redirect loop error, in chrome and FF.
Assume this has something to do with port redirecting behind the scenes. How to fix it? Do I need a custom RequireHttpsAttribute?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
找到答案此处和< a href="https://gist.github.com/915869">此处。需要自定义 RequireHttpsAttribute 覆盖。
Found the answers here and here. A custom RequireHttpsAttribute override was necessary.