After upgrading to NC17 the geolocation feature doesn't work anymore. If I go to the Maps app I get a browser warning about the issue (geolocation is allowed for my NC URL in my browser settings). When I try to jump to my current location by clicking on the little icon in the down-right area of Maps the same warning appears...
Geolocation error: Geolocation has been disabled in this document by Feature Policy..
I checked the Feature Policy via Mozilla's Observatory service and I found that NC17 has set the geolocation feature to 'none'.
Feature-Policy: autoplay 'self';camera 'self';fullscreen 'self';geolocation 'none';microphone 'self';payment 'none'
That issue didn't exist with NC16. So, I guess it probably is a NC core issue. But I'm not sure.
Changing the lines...
to...
/** @var string[] of allowed domains that can use the geolocation of the device */
protected $geolocationDomains = [
'\'self\'',
];
...enables the geolocation feature. But this change will trigger a warning in the admin panel because of a non-matching file hash (altered file).
@rullzer what do we do here – should @AlfredSK submit the patch as a pull request to server, or should the Maps app specifically ask for permission?
Needs a fix in the maps app to enable this when the page is loaded. I can submit a PR.
I'll do that this evening/tomorrow (if not then ping me again ;) ).
It will be a bit hacky as otherwise 16 support gets dropped.
@rullzer ah cool, thanks a lot! cc @eneiluj @tacruc for info. :)
I'll do that this evening/tomorrow (if not then ping me again ;) ).
It will be a bit hacky as otherwise 16 support gets dropped.
@rullzer ping
Most helpful comment
Needs a fix in the maps app to enable this when the page is loaded. I can submit a PR.