0

We have a big website with mix of https and http pages. And when i am on https page it tries to load resources by http protocol and some browsers block it as insecure (chrome for ex.).

So the question: how can i do some filter that allows me to load resources by https only from certain pages?

We are using httpd server and Spring security in our application.

So, how can i construct urls in JSP relative by context and by protocol? (I mean i cant simple write relative URLs in my page, because it is used in different contexts, for example as example.com/resource.css and mydomain.corp/resource.css)

4

2 回答 2

1

使用方案相对 URI。

//example.com/foo/bar/baz
于 2012-10-05T06:33:37.847 回答
0

获取协议,然后加载您需要的资产。我认为你应该assertProtocolAndFilenames在 Spring 中使用。

于 2012-10-05T06:31:59.780 回答