HTTPS with URL rewriting is not working on appharbor

前端 未结 2 595
谎友^
谎友^ 2021-01-07 04:04

I have built an application on asp.net 3.5 which is hosted on AppHarbor. The problem is that on HTTPS URL rewriting is not working. The following is the code to run some of

2条回答
  •  清歌不尽
    2021-01-07 04:53

    RequireHttpsAttribute: If you're using the built-in RequireHttpsAttribute to ensure that a controller action always uses HTTPS you will experience a redirect loop. The reason is that SSL is terminated at the load balancer level and RequireHttps doesn't recognize the X-Forwarded-Proto header it uses to indicate that the request was made using HTTPS.

    The "meat" is in bold.

    See: AppHarbor SSL FAQ - specifically the Troubleshooting section.

    It's the same issue if you have an SSL concentrator or similar device in front of your web server(s). It's quite common in "cloud hosting" environments....

    Hth....

提交回复
热议问题