Update docs

This commit is contained in:
Alan Grainger
2026-10-07 14:53:14 +13:00
parent b1dab610a4
commit daa099aca1
8 changed files with 69 additions and 99 deletions
-13
View File
@@ -2,19 +2,6 @@ import { getConfigOption, getNumericConfigOption } from '@ipp/core'
const MB = 1024 * 1024
/**
* Path the share routes are mounted under, from `PUBLIC_BASE_URL`: `''` for
* an own-hostname deployment, `/upload` for `https://photos.example.com/upload`.
*/
export function basePathFrom (publicBaseUrl: string | undefined): string {
if (!publicBaseUrl) return ''
try {
return new URL(publicBaseUrl).pathname.replace(/\/+$/, '')
} catch {
return ''
}
}
/** IPP's public URL from `GALLERY_URL`, without a trailing slash, or undefined when unset. */
export function galleryUrl (): string | undefined {
return (process.env.GALLERY_URL || '').replace(/\/+$/, '') || undefined