mapcentia / geocloud2

The GC2 framework helps you build a spatial data infrastructure quickly and easily. Powered using open source components for a scalable solution focused on freedom rather than fees.
https://www.osgeo.org/projects/gc2-vidi/
GNU Affero General Public License v3.0
148 stars 67 forks source link

Can GeoCloud 2 run on a https protected server? #2

Closed ottok closed 9 years ago

ottok commented 10 years ago

I tried running GeoCloud on a https-server. I did change the http to https at https://github.com/mapcentia/geocloud2/blob/master/app/conf/hosts.php.dist instance on my server, but it only the first pages and login work. Most JavaScript functionality fails because external scripts are requested via http (not https) and thus browsers block the requests. I grepped the sources and noticed http is hard coded in very many places.

Is GeoCloud2 supposed to work over a https connection? I know PHP, can I help by adding a new configuration option 'protocol' to App.php and then replace all http references in the sources to use the configuration option instead, so that it can be changed?

mapcentia commented 10 years ago

Thanks for mention this. You are right, GC2 is not tested with https, but should work if the changes you suggest if implemented.

I’ll very much appreciate your help with this.

ottok commented 10 years ago

This is not immediately relevant for our use case but I might send a pull request some day to implement this. Feel free to assign this task to me.

mapcentia commented 10 years ago

Thanks!

mapcentia commented 10 years ago

GC2 now supports HTTPS. Add "protocol" => "http" to the App class in App.php. All base layer tiles are loaded over HTTPS except MapQuest OSM tiles. Check out the 'ssl' branch for test. I'll soon merge with master.

mapcentia commented 10 years ago

Of couse it's "protocol" => "https". It'll default to "protocol" => "http".

mapcentia commented 9 years ago

No need to add the config "protocol" => "https". Protocol is now detected. And do NOT use the config if you are mixing http and https.