xemle / home-gallery

Self-hosted open-source web gallery to view your photos and videos featuring mobile-friendly, tagging and AI powered image discovery
https://home-gallery.org
MIT License
836 stars 64 forks source link

basePath configuration broken #151

Closed MarioSob closed 1 month ago

MarioSob commented 2 months ago

Recently I upgraded gallery from version I installed around April 2024 to newest one. I use docker compose to launch it on Linux x86 64bit. Unfortunately I discovered that support for configuration entry basePath is broken in newest version. Configuration of: basePath: '/hg/mario/' worked perfectly before but now it causes frontend to try to fetch resources from for example: https://domain/hg/mario/hgmario/App.2aa10ed6.css This makes page unable to render at all.

MarioSob commented 2 months ago

Generated gallery HTML head section is invalid as well:

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <base href="hgmario/">
    <link rel="shortcut icon" href="favicon.ico" />
    <link rel="apple-touch-icon" href="logo192.png" />
    <meta name="theme-color" content="#909090" />
    <link rel="manifest" href="manifest.webmanifest" crossorigin="use-credentials">
    <link rel="stylesheet" href="App.2aa10ed6.css">
    <title>Home Gallery</title>
</head>
xemle commented 2 months ago

Hi @MarioSob Thank you for your issue and highlighting the problem well.

I've fixed it in the newest master 14c0f73 and the base path of /hg/mario/ should working again.

Can you confirm it?

xemle commented 2 months ago

@MarioSob Please see discussions on gitter regarding the basePath. A new server option prefix was introduced.

MarioSob commented 1 month ago

I confirm it works now. Thank you for fixing this. I only have "basePath" configured in configuration file and it seems to be sufficient.