Reputation: 91865
I'd like to return a "403.4: SSL required" substatus from Nancy. How can I do this? I'm using ASP.NET hosting.
Upvotes: 0
Views: 437
Reputation: 26599
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 )
Upvotes: 2