w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Does Ring request {:scheme :https} guarantee a HTTPS connection?

This is probably a question that relates to whatever servlet container you're using rather than ring.

ring-servlet populates the :scheme key by getting a value from the HttpServletRequest:

:scheme (keyword (.getScheme request))

The servlet specification has only this to say about getScheme:

Returns the name of the scheme used to make this request, for example, http, https, or ftp. Different schemes have different rules for constructing URLs, as noted in RFC 1738.

Interestingly, ring-servlet does not call the isSecure method on the servlet request. So I think your question should probably be:

"When using <insert your container name here> is it possible for getScheme() on a ServletRequest to return "https" when isSecure() returns false?"





© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.