mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-22 19:25:18 -04:00
Change schema of url environment variables (#1237)
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
parent
41e493c8bc
commit
a48b4f60bb
18 changed files with 33 additions and 33 deletions
|
@ -5,5 +5,5 @@
|
|||
*/
|
||||
|
||||
export const useBackendBaseUrl = (): string => {
|
||||
return process.env.REACT_APP_BACKEND_BASE_URL ?? '/mock-backend'
|
||||
return process.env.REACT_APP_BACKEND_BASE_URL ?? '/mock-backend/'
|
||||
}
|
||||
|
|
|
@ -8,5 +8,5 @@ import { useBackendBaseUrl } from './use-backend-base-url'
|
|||
|
||||
export const useCustomizeAssetsUrl = (): string => {
|
||||
const backendBaseUrl = useBackendBaseUrl()
|
||||
return (process.env.REACT_APP_CUSTOMIZE_ASSETS_URL || `${ backendBaseUrl }/public`)
|
||||
return (process.env.REACT_APP_CUSTOMIZE_ASSETS_URL || `${ backendBaseUrl }public/`)
|
||||
}
|
||||
|
|
|
@ -11,5 +11,5 @@ export const useFrontendBaseUrl = (): string => {
|
|||
const location = window.location
|
||||
const cleanedPathName = location.pathname.replace(pathname, '')
|
||||
|
||||
return `${ location.protocol }//${ location.host }${ cleanedPathName }`
|
||||
return `${ location.protocol }//${ location.host }${ cleanedPathName }/`
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue