[Flask] probably ssl-related, flask-googlemaps issue, on a heroku deploy

David Nieder davidnieder at gmx.de
Mon Dec 21 04:09:14 EST 2015


On 21.12.2015 04:43, Kyle Lawlor wrote:
> Hi, all.
>
> I recently uploaded my web app onto Heroku. It is a site that I am making
> for a friends restaurant: lacasadelsabor.herokuapp.com
>
> The trouble is that I'm using *Flask-Googlemaps* to display the restaurant
> location, but the map does not load by default (
> lacasadelsabor.herokuapp.com/maps). I've noticed that if I "disable
> protection for now" (in ubuntu firefox) the map does load. The map also
> loads fine when run locally with gunicorn. (I did not test locally with
> heroku yet).
>
> I'm using *Flask-SSLify* and that seems to be configured properly. (I've
> got it so that it triggers only when run in the Heroku)
>
>      curl -I http://lacasadelsabor.herokuapp.com
>>
>>      HTTP/1.1 302 FOUND
>>      Connection: keep-alive
>>      Server: gunicorn/19.4.1
>>      Date: Mon, 21 Dec 2015 03:29:47 GMT
>>      Content-Type: text/html; charset=utf-8
>>      Content-Length: 281
>>      Location: https://lacasadelsabor.herokuapp.com/
>>      Via: 1.1 vegur
>>
>
> Additionally I am seeing an alert in firefox by the ssl-lock icon. Which
> says "firefox blocks parts of the page that are not are not secure".
>

The problem is that you tell the browser to load resources over http 
while your site was served over https. Modern browsers won't do that.

I'm guessing that flask-googlemaps included those lines.
The latest commit on github seems to deal with this issue.
https://github.com/rochacbruno/Flask-GoogleMaps/commit/c7b5979684ff7bf11d90270a56bae44e461de9fb

Try updating the extensions and check if you have version 0.1.9 
installed. That probably solves this issue.

If you've included urls yourself just change the url scheme to https or 
use relative schemes:

<script src="//maps.googleapis.com/..."></script>

> I'm sure that I am doing or missing something stupid.
> Any pointers on where I should go from here?
>
> Thanks for your time,
> Kyle
>
>
>




More information about the Flask mailing list