本文介绍了Ring请求{:scheme:https}是否保证HTTPS连接?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果Ring请求映射键:scheme 的值为:https ,那么它保证HTTPS连接已经建立并且没有证书错误?

If the Ring request map key :scheme has value of :https, is it guaranteed that a HTTPS connection has been established and there were no certificate errors?

推荐答案

这可能是一个问题,涉及到你使用的servlet容器

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

ring-servlet通过:

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

:scheme(keyword(.getScheme request))

servlet规范只有这样来说明 getScheme

The servlet specification has only this to say about getScheme:

有趣的是,ring-servlet 不会对servlet请求调用 isSecure 方法。所以我想你的问题应该是:

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

当使用<插入你的容器名称这里>是一个ServletRequest的getScheme当isSecure()返回false时,https?

这篇关于Ring请求{:scheme:https}是否保证HTTPS连接?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-05 13:13