I see that version 2 of MVC.NET now has the RequireHttps attribute, which works fine for me. However, what is a good strategy for removing the effect? For example, I want to use Https on some pages, but regular Http for others. Should I create my own RequireHttp attribute?
EDIT: I use my own RequireHttp attribute, and it works fine, but I wonder if there is any built-in functionality in the MVC.NET version 2 version that I am missing.
EDIT 2: I should not have been clear. My question is this: if you use RequireHttps, then any requests after that will exceed Https, even if the controller or action is not decorated with RequireHttps. If I'm not mistaken, you need a second attribute, such as RequireHttp, to redirect requests to Http instead of Https.
royco source
share