forked from XiaoMo/ChatGPT-Next-Web
Merge pull request #100 from iSource/fix-docker-access-code
fix: docker access code setting missing
This commit is contained in:
commit
7f3cbaa064
@ -14,3 +14,4 @@ export function getAccessCodes(): Set<string> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const ACCESS_CODES = getAccessCodes();
|
export const ACCESS_CODES = getAccessCodes();
|
||||||
|
export const IS_IN_DOCKER = process.env.DOCKER;
|
||||||
|
@ -3,7 +3,7 @@ import "./styles/globals.scss";
|
|||||||
import "./styles/markdown.scss";
|
import "./styles/markdown.scss";
|
||||||
import "./styles/prism.scss";
|
import "./styles/prism.scss";
|
||||||
import process from "child_process";
|
import process from "child_process";
|
||||||
import { ACCESS_CODES } from "./api/access";
|
import { ACCESS_CODES, IS_IN_DOCKER } from "./api/access";
|
||||||
|
|
||||||
let COMMIT_ID: string | undefined;
|
let COMMIT_ID: string | undefined;
|
||||||
try {
|
try {
|
||||||
@ -28,7 +28,7 @@ export const metadata = {
|
|||||||
function Meta() {
|
function Meta() {
|
||||||
const metas = {
|
const metas = {
|
||||||
version: COMMIT_ID ?? "unknown",
|
version: COMMIT_ID ?? "unknown",
|
||||||
access: ACCESS_CODES.size > 0 ? "enabled" : "disabled",
|
access: (ACCESS_CODES.size > 0 || IS_IN_DOCKER) ? "enabled" : "disabled",
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
Loading…
Reference in New Issue
Block a user