Allow using geolocation in the dashboard

Else the weather geolocation is kind of useless.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
Roeland Jago Douma 2020-08-20 09:00:03 +02:00
parent 1f4c029977
commit f6578b74f4
No known key found for this signature in database
GPG key ID: F941078878347C0C

View file

@ -111,7 +111,14 @@ class DashboardController extends Controller {
$this->inititalStateService->provideInitialState('dashboard', 'version', $this->config->getUserValue($this->userId, 'dashboard', 'backgroundVersion', 0));
$this->config->setUserValue($this->userId, 'dashboard', 'firstRun', '0');
return new TemplateResponse('dashboard', 'index');
$response = new TemplateResponse('dashboard', 'index');
// For the weather widget we should allow the geolocation
$featurePolicy = new Http\FeaturePolicy();
$featurePolicy->addAllowedGeoLocationDomain('\'self\'');
$response->setFeaturePolicy($featurePolicy);
return $response;
}
/**