Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSL Support #45

Open
michidk opened this issue Jun 6, 2016 · 4 comments
Open

SSL Support #45

michidk opened this issue Jun 6, 2016 · 4 comments

Comments

@michidk
Copy link

michidk commented Jun 6, 2016

Currently presskit doesn't support ssl (using https://).
When i connect to my presskit installation using ssl, i get multiple mixed content errors.

e.g.:
Mixed Content: The page at 'https://press.mydomain.com/sheet.php?p=template' was loaded over HTTPS, but requested an insecure script 'http://cdnjs.cloudflare.com/ajax/libs/masonry/3.1.2/masonry.pkgd.min.js'. This request has been blocked; the content must be served over HTTPS.

@garrettcolas
Copy link

@dafrancis
Copy link

You don't even need that. Using PHP to determine whether the installation is using SSL and changing the JS/CSS links accordingly would be overcomplicating the issue.

There used to be a neat hack to allow a protocol-relative url source when importing a javascript file. So rather than:

<script src="http://cdn.somecdnsite.com/javascript/libs/javascript-library.min.js></script>

you'd do:

<script src="//cdn.somecdnsite.com/javascript/libs/javascript-library.min.js></script>

More info on protocol-relative urls can be read on this blogpost by Paul Irish.

However, if you read that post, it notes that doing protocol-relative urls are discouraged if the resource is available over HTTPS anyway.

So with this I suggest that any external javascript/css from a cdn should be changed to use the resource over HTTPS (i.e. do a search and replace of all "http://cdnjs" and replace with "https://cdnjs".

@TheSeg
Copy link

TheSeg commented Jun 6, 2016

Agreed to @dafrancis comments, but specifically with declaring HTTPS in all instances. Not the protocol-relative approach.

@garrettcolas
Copy link

Oh, that's much easier, I completely agree as well.

TheSeg added a commit to TheSeg/dopresskit that referenced this issue Jun 7, 2016
* Resources from CloudFlare.
* PromoterApp.
* Youtube links and references.
* Vimeo links and references.
* Update Dropbox links to current resolved URL.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants