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

website issue - ajax demo has an error #1145

Closed
cssyphus opened this issue Jun 20, 2019 · 4 comments
Closed

website issue - ajax demo has an error #1145

cssyphus opened this issue Jun 20, 2019 · 4 comments

Comments

@cssyphus
Copy link

Just so you know, on the brython.info website (Demo page) there is an error returned by the AJAX demo (it sits on the "waiting . . ." message forever). Error returned in console is:

Mixed Content: The page at 'https://brython.info/demo.html?lang=en#' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://api.open-notify.org/iss-now.json'. This request has been blocked; the content must be served over HTTPS.

@PierreQuentel
Copy link
Contributor

Thanks for reporting this !

The demo works if the page at brython.info is served in http, not https.

If https is used, the Ajax request using http is considered "Mixed Content" and raises the error message you mention. And unfortunately, api.open-notify.org doesn't seem to support https. So I think the best would be to add a comment on the demo page, saying that it will only work in http.

@cssyphus
Copy link
Author

I arrived at the website following a google search, so was receiving page in however-it-is-usually-served. Can you perhaps use an .htacess file to force serving page in https? Just a thot.

@PierreQuentel
Copy link
Contributor

Adding an .htaccess file is something the owner of api.open-notify.org would have to do, not on the brython.info side.

@PierreQuentel
Copy link
Contributor

The request for https support was made to the Open-Notify-API project long ago, but without any result apparently.

PierreQuentel pushed a commit that referenced this issue Jul 6, 2019
…odule javascript instead of brower.window to access Date, RegExp and String objects
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

2 participants