Https issue with local OSM server

Hi, I have installed my own OSM server on ubuntu 22.04. While I get a map with http, with https I only get a blank screen and have only the zoom out/in buttons. The certificate is working (browser says secure connection). Also I am able to fetch a tile successfully in the browser, for example https://tile.sg-nms.local/osm/12/2133/1445.png.
Any hint what I can check, what I am doing wrong? Sorry if this is a noob question.

If you’re using a different URL for tiles then you probably need to edit config/initializers/secure_headers.rb and add the host to the default img_src rule in the security policy.

If that is the problem then you should see warnings in the javascript console about policy violations and the tile loads in the network tab should show as blocked by the CSP rules.

That said CSP enforcement is off in the default settings so unless you changed that to set csp_enforce to true then maybe that isn’t your problem. The browser debugger is the place to start looking for clues in any case.

2 Likes

Hi Tom,
thanks a lot for your help. The hint with the browser debugger brought the solution and the place where to look for. In my case simply the index.html pointed to non https URLs. Thread can be closed.

1 Like