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

http https #49

Closed
gregpalaci opened this issue Dec 12, 2015 · 6 comments
Closed

http https #49

gregpalaci opened this issue Dec 12, 2015 · 6 comments
Labels
issue: bug Issue reporting a bug
Milestone

Comments

@gregpalaci
Copy link

remove all hardcoded protocols.....
also security ssl: true doesn't do anything?

example: $.get('//strapi-1-5-gregbenner.c9users.io', function(data) { }); will resolve http or https and work.

Mixed Content: The page at 'https://strapi-1-5-gregbenner.c9users.io/admin/#!/strapi/explorer/post/create' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://strapi-1-5-gregbenner.c9users.io/:8080/admin/explorer/user?limit=10&skip=0&where=%7B%7D'. This request has been blocked; the content must be served over HTTPS.(anonymous function) @ vendors.js:10765sendReq @ vendors.js:10558serverRequest @ vendors.js:10268processQueue @ vendors.js:14792(anonymous function) @ vendors.js:14808Scope.$eval @ vendors.js:16052Scope.$digest @ vendors.js:15870Scope.$apply @ vendors.js:16160done @ vendors.js:10589completeRequest @ vendors.js:10787requestLoaded @ vendors.js:10728
vendors.js:10765 Mixed Content: The page at 'https://strapi-1-5-gregbenner.c9users.io/admin/#!/strapi/explorer/post/create' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://strapi-1-5-gregbenner.c9users.io/:8080/admin/explorer/comment?limit=10&skip=0&where=%7B%7D'. This request has been blocked; the content must be served over HTTPS.(anonymous function) @ vendors.js:10765sendReq @ vendors.js:10558serverRequest @ vendors.js:10268processQueue @ vendors.js:14792(anonymous function) @ vendors.js:14808Scope.$eval @ vendors.js:16052Scope.$digest @ vendors.js:15870Scope.$apply @ vendors.js:16160done @ vendors.js:10589completeRequest @ vendors.js:10787requestLoaded @ vendors.js:10728
vendors.js:12520 Error: [jqLite:nosel] Looking up elements via selectors is not supported by jqLite! See: http://docs.angularjs.org/api/angular.element
http://errors.angularjs.org/1.4.8/jqLite/nosel
    at vendors.js:68
    at JQLite (vendors.js:2809)
    at removeComments (vendors.js:9031)
    at vendors.js:8507
    at processQueue (vendors.js:14792)
    at vendors.js:14808
    at Scope.$eval (vendors.js:16052)
    at Scope.$digest (vendors.js:15870)
    at Scope.$apply (vendors.js:16160)
    at done (vendors.js:10589)(anonymous function) @ vendors.js:12520(anonymous function) @ vendors.js:9292processQueue @ vendors.js:14800(anonymous function) @ vendors.js:14808Scope.$eval @ vendors.js:16052Scope.$digest @ vendors.js:15870Scope.$apply @ vendors.js:16160done @ vendors.js:10589completeRequest @ vendors.js:10787requestLoaded @ vendors.js:10728
vendors.js:29708 GET https://strapi-1-5-gregbenner.c9users.io/admin/select2.png 404 (Not Found)(anonymous function) @ vendors.js:29708forEach @ vendors.js:354computeCssStyles @ vendors.js:29707computeCachedCssStyles @ vendors.js:29827computeTimings @ vendors.js:29890init @ vendors.js:30040prepareRegularAnimation @ vendors.js:30686initDriverFn @ vendors.js:30466invokeFirstDriver @ vendors.js:32141triggerAnimationStart @ vendors.js:31987nextTick @ vendors.js:29432scheduler @ vendors.js:29402(anonymous function) @ vendors.js:32009Scope.$digest @ vendors.js:15946Scope.$apply @ vendors.js:16160done @ vendors.js:10589completeRequest @ vendors.js:10787requestLoaded @ vendors.js:10728
onloadwff.js:417 GET https://strapi-1-5-gregbenner.c9users.io/admin/select2.png 404 (Not Found)lpIsVisible @ onloadwff.js:417fieldIsDoublePassword @ onloadwff.js:976chk_form_has_password @ onloadwff.js:942checkForLoginForm @ onloadwff.js:937setupIcons @ onloadwff.js:672evalScriptsInFrame @ onloadwff.js:212(anonymous function) @ onloadwff.js:403
vendors.js:10765 Mixed Content: The page at 'https://strapi-1-5-gregbenner.c9users.io/admin/#!/strapi/explorer/post/create' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://strapi-1-5-gregbenner.c9users.io/:8080/admin/explorer/user?limit=10&skip=0&where=%7B%7D'. This request has been blocked; the content must be served over HTTPS.(anonymous function) @ vendors.js:10765sendReq @ vendors.js:10558serverRequest @ vendors.js:10268processQueue @ vendors.js:14792(anonymous function) @ vendors.js:14808Scope.$eval @ vendors.js:16052Scope.$digest @ vendors.js:15870Scope.$apply @ vendors.js:16160(anonymous function) @ vendors.js:17927completeOutstandingRequest @ vendors.js:5552(anonymous function) @ vendors.js:5829
vendors.js:10765 Mixed Content: The page at 'https://strapi-1-5-gregbenner.c9users.io/admin/#!/strapi/explorer/post/create' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://strapi-1-5-gregbenner.c9users.io/:8080/admin/explorer/user?limit=10&skip=0&where=%7B%22id%22:%7B%22!%22:%5B1%5D%7D%7D'. This request has been blocked; the content must be served over HTTPS.(anonymous function) @ vendors.js:10765sendReq @ vendors.js:10558serverRequest @ vendors.js:10268processQueue @ vendors.js:14792(anonymous function) @ vendors.js:14808Scope.$eval @ vendors.js:16052Scope.$digest @ vendors.js:15870Scope.$apply @ vendors.js:16160(anonymous function) @ vendors.js:17927completeOutstandingRequest @ vendors.js:5552(anonymous function) @ vendors.js:5829
vendors.js:10765 Mixed Content: The page at 'https://strapi-1-5-gregbenner.c9users.io/admin/#!/strapi/explorer/post/create' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://strapi-1-5-gregbenner.c9users.io/:8080/admin/explorer/comment?limit=10&skip=0&where=%7B%7D'. This request has been blocked; the content must be served over HTTPS.
@loicsaintroch loicsaintroch added framework issue: feature request Issue suggesting a new feature labels Dec 12, 2015
@loicsaintroch loicsaintroch added this to the v1.5.0 milestone Dec 12, 2015
@loicsaintroch loicsaintroch self-assigned this Dec 12, 2015
@loicsaintroch
Copy link

Not sure to fully understand your issue. The SSL config needs two keys:

  • disabled (boolean): If true, this middleware will allow all requests through.
  • trustProxy (boolean): If true, trust the X-Forwarded-Proto header.

To enable SSL your config should look like this:

{
  "ssl": {
    "disabled": false,
    "trustProxy": false
  }
}

@gregpalaci
Copy link
Author

You've hardcoded the protocol to http so on an https site everything breaks.

I've fixed it for myself 'hacking' by changing admin/frontend.js line 1775 to Config.backendUrl = '';

Mixed Content: The page at 'https://strapi-1-5-gregbenner.c9users.io/admin/#!/strapi/explorer/post/create' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://strapi-1-5-gregbenner.c9users.io/:8080/admin/explorer/user?limit=10&skip=0&where=%7B%7D'. This request has been blocked;

This is saying hey you are on https site but you tried to use an http request I'm a browser and I don't like that so you can't do it. :)

@pierreburgy
Copy link
Member

Good catch @gregbenner, we are working on it.

@pierreburgy
Copy link
Member

We just fixed it : strapi/strapi-generate-admin@26626fb

It will be published in strapi-generate-admin v1.5.2.

Thanks again for your feedback @gregbenner

@loicsaintroch loicsaintroch added issue: bug Issue reporting a bug admin and removed documentation issue: feature request Issue suggesting a new feature labels Dec 15, 2015
@loicsaintroch
Copy link

@gregbenner: can you try the solution of @pierreburgy and give us your feedback please?

@gregpalaci
Copy link
Author

looks like a solve to get the current host url, @pierreburgy
could also leave it as '/' but should work either way.

@strapi strapi locked and limited conversation to collaborators Dec 20, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
issue: bug Issue reporting a bug
Projects
None yet
Development

No branches or pull requests

3 participants