mirror of
https://github.com/zkldi/Tachi.git
synced 2026-10-08 22:59:52 +03:00
Add CDN_WEB_LOCATION to confjson5
This commit is contained in:
Vendored
+1
@@ -23,6 +23,7 @@
|
||||
TYPE: "omni",
|
||||
ENABLE_SERVER_HTTPS: false,
|
||||
RUN_OWN_CDN: true,
|
||||
CDN_WEB_LOCATION: "/cdn",
|
||||
OUR_URL: "https://example.com",
|
||||
EMAIL_CONFIG: {
|
||||
FROM: "test <zkldi@example.com>",
|
||||
|
||||
@@ -42,7 +42,7 @@ export function CDNRedirect(res: Response, fileLoc: string) {
|
||||
throw new Error(`Invalid fileLoc - did not start with /.`);
|
||||
}
|
||||
|
||||
return res.redirect(`/cdn${fileLoc}`);
|
||||
return res.redirect(`${ServerConfig.CDN_WEB_LOCATION}${fileLoc}`);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -78,6 +78,7 @@ export interface TachiConfig {
|
||||
LOGGER_DISCORD_WEBHOOK?: string;
|
||||
DISCORD_WHO_TO_TAG?: string[];
|
||||
ENABLE_PUBLIC_SIGNUP?: boolean;
|
||||
CDN_WEB_LOCATION: string;
|
||||
}
|
||||
|
||||
const isValidOauth2 = p.optional({
|
||||
@@ -118,6 +119,7 @@ const err = p(config, {
|
||||
LOGGER_DISCORD_WEBHOOK: "*string",
|
||||
DISCORD_WHO_TO_TAG: p.optional(["string"]),
|
||||
ENABLE_PUBLIC_SIGNUP: "*boolean",
|
||||
CDN_WEB_LOCATION: "string",
|
||||
});
|
||||
|
||||
if (err) {
|
||||
|
||||
Reference in New Issue
Block a user