Skip to content

Commit 5ed7bac

Browse files
committed
set crossorigin header for manifest. fixes dokuwiki#4322
To summarize the issue: 1. the wiki is protected by Basic auth, outside of the wiki 2. chrome will not pass authentication credentials when accessing a linked manifest 3. the webserver will deny access to the manifest DokuWiki does not care about the auth credentials, because the manifest returns public info only. The issue is really with the webserver denying the request. Using a crossorigin hint will work around the chrome behaviour. The only potential downside would be that chrome now will send auth credentials even when there is no web server based auth. Since DokuWiki doesn't care, it's not really a downside.
1 parent 999fe61 commit 5ed7bac

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

inc/template.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,8 @@ function tpl_metaheaders($alt = true)
269269
if (actionOK('manifest')) {
270270
$head['link'][] = [
271271
'rel' => 'manifest',
272-
'href' => DOKU_BASE . 'lib/exe/manifest.php'
272+
'href' => DOKU_BASE . 'lib/exe/manifest.php',
273+
'crossorigin' => 'use-credentials' // See issue #4322
273274
];
274275
}
275276

0 commit comments

Comments
 (0)