Skip to content

Commit

Permalink
Merge pull request #100 from iSource/fix-docker-access-code
Browse files Browse the repository at this point in the history
fix: docker access code setting missing
  • Loading branch information
Yidadaa authored Mar 28, 2023
2 parents e93ea0f + eb72c83 commit 7f3cbaa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions app/api/access.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ export function getAccessCodes(): Set<string> {
}

export const ACCESS_CODES = getAccessCodes();
export const IS_IN_DOCKER = process.env.DOCKER;
4 changes: 2 additions & 2 deletions app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import "./styles/globals.scss";
import "./styles/markdown.scss";
import "./styles/prism.scss";
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;
try {
Expand All @@ -28,7 +28,7 @@ export const metadata = {
function Meta() {
const metas = {
version: COMMIT_ID ?? "unknown",
access: ACCESS_CODES.size > 0 ? "enabled" : "disabled",
access: (ACCESS_CODES.size > 0 || IS_IN_DOCKER) ? "enabled" : "disabled",
};

return (
Expand Down

1 comment on commit 7f3cbaa

@vercel
Copy link

@vercel vercel bot commented on 7f3cbaa Mar 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.