After deploying w# client page to the github pages, I got the following error:
Mixed Content: The page at 'https://aph5nt.github.io/websharper.amplifyjs/' was loaded over HTTPS, but requested an insecure script 'http://code.jquery.com/jquery-1.11.2.min.js'. This request has been blocked; the content must be served over HTTPS.(anonymous function) @ SampleApp.head.js:1
amplify.js:830 Uncaught ReferenceError: jQuery is not defined
Is it possible somehow to fix this error?
On a quick look, the problem is that jQuery is referenced, incorrectly, in WebSharper core via http
:
Namespace "WebSharper.JQuery.Resources" [
Resource "JQuery" "http://code.jquery.com/jquery-1.11.2.min.js"
|> fun r -> r.AssemblyWide()
]
This causes every reference to jQuery to automatically pull in the above resource, and applications served over https
will fail to load it.
Until this is fixed, you can override your reference to jQuery in your web.config
to use a protocol-less URL:
<appsettings>
<add key="WebSharper.JQuery.Resources.JQuery" value="//code.jquery.com/jquery-1.11.1.min.js" />
...
Hope this helps.