mirror of
https://github.com/xuthus83/pigallery2.git
synced 2024-11-03 21:04:03 +08:00
Fixing base url issue. Fixes: #178
This commit is contained in:
parent
4022c04f33
commit
f1d9fa0933
@ -40,6 +40,7 @@ export class ConfigDiagnostics {
|
||||
|
||||
|
||||
static async testMetaFileConfig(metaFileConfig: ClientConfig.MetaFileConfig, config: IPrivateConfig) {
|
||||
// TODO: now we have metadata for pg2conf files too not only gpx that also runs without map
|
||||
if (metaFileConfig.enabled === true &&
|
||||
config.Client.Map.enabled === false) {
|
||||
throw new Error('*.gpx meta files are not supported without MAP');
|
||||
|
@ -82,7 +82,7 @@ export class PublicRouter {
|
||||
res.tpl.user.csrfToken = req.csrfToken();
|
||||
}
|
||||
}
|
||||
res.tpl.clientConfig = {Client: Config.Client.toJSON({attachVolatile: true})};
|
||||
res.tpl.Config = {Client: Config.Client.toJSON({attachVolatile: true})};
|
||||
|
||||
return next();
|
||||
});
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<base href="<%= clientConfig.urlBase %>/"/>
|
||||
<base href="<%= Config.Client.urlBase %>/"/>
|
||||
<meta charset="UTF-8">
|
||||
<title>Loading..</title>
|
||||
<link rel="shortcut icon" href="assets/icon.png">
|
||||
@ -14,7 +14,7 @@
|
||||
crossorigin=""/>
|
||||
|
||||
<script>
|
||||
var ServerInject = {user: <%- JSON.stringify(user); %>, ConfigInject: <%- JSON.stringify(clientConfig); %>}
|
||||
var ServerInject = {user: <%- JSON.stringify(user); %>, ConfigInject: <%- JSON.stringify(Config); %>}
|
||||
</script>
|
||||
|
||||
</head>
|
||||
|
Loading…
Reference in New Issue
Block a user