Skip to content

Commit a69ab01

Browse files
committed
Use absolute URLs for pwa icons
Signed-off-by: Matt Friedman <maf675@gmail.com>
1 parent e340b99 commit a69ab01

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

controller/manifest.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ public function handle(): JsonResponse
6161
}
6262

6363
$board_path = $this->config['force_server_vars'] ? $this->config['script_path'] : $this->path_helper->get_web_root_path();
64+
$board_url = generate_board_url();
6465

6566
$manifest = [
6667
'name' => $this->config['sitename'],
@@ -76,12 +77,12 @@ public function handle(): JsonResponse
7677
{
7778
$manifest['icons'] = [
7879
[
79-
'src' => $this->config['icons_path'] . '/' . $this->config['pwa_icon_small'],
80+
'src' => $board_url . '/' . $this->config['icons_path'] . '/' . $this->config['pwa_icon_small'],
8081
'sizes' => '192x192',
8182
'type' => 'image/png'
8283
],
8384
[
84-
'src' => $this->config['icons_path'] . '/' . $this->config['pwa_icon_large'],
85+
'src' => $board_url . '/' . $this->config['icons_path'] . '/' . $this->config['pwa_icon_large'],
8586
'sizes' => '512x512',
8687
'type' => 'image/png'
8788
]

0 commit comments

Comments
 (0)