I'd like to return a "403.4: SSL required" substatus from Nancy. How can I do this? I'm using ASP.NET hosting.
Asked
Active
Viewed 432 times
1 Answers
2
You can't unfortunately, Nancy is hosting agnostic, so only supports status codes, not the made up substatus codes that only IIS uses :-)
OWASP would suggest you just drop connections that don't use HTTPS, although IETF seem to suggest using 426 https://www.rfc-editor.org/rfc/rfc2817#section-4.2 ( from What is the proper HTTP response to send for requests that require SSL/TLS )

Community
- 1
- 1

Steven Robbins
- 26,441
- 7
- 76
- 90
-
You *can* but you would have to create your own host (easy, copy our code) and then stick the code in the NancyContext and read that into the substatus. – TheCodeJunkie Nov 27 '12 at 11:48