owlfox / TerriaMap

Taiwan fork of Catalog-based web geospatial visualisation platform.
https://map.owlfox.org
Apache License 2.0
0 stars 0 forks source link

turn off http #4

Closed owlfox closed 4 years ago

owlfox commented 4 years ago

Sometimes the user might access the site through http, which caused cors happen. I kept it on for the access of swagger document swagger.json

maybe I should check my nginx and figure out a way to fix it

owlfox commented 4 years ago

The reason I didn't turn it off is because flask-restplus didn't handle http redirect to https well after a monkey patch of this python package and

server {
    listen 80;
    listen [::]:80;
    server_name _;
    return 301 https://map.owlfox.org$request_uri;
}

this nginx config, now the sites handles http to https fairly well. https://github.com/noirbizarre/flask-restplus/issues/223