mirror of
https://github.com/Sea-Haven-Industries/open-swe.git
synced 2026-09-30 15:03:16 +00:00
fix: proper isProd check in auth (#457)
This commit is contained in:
parent
05bc1b3559
commit
4f31962b4e
1 changed files with 2 additions and 4 deletions
|
|
@ -88,9 +88,9 @@ function isRunReq(reqUrl: string): boolean {
|
|||
|
||||
export const auth = new Auth()
|
||||
.authenticate<AuthenticateReturn>(async (request: Request) => {
|
||||
const isProdEnv = process.env.NODE_ENV === "production";
|
||||
const isProd = process.env.NODE_ENV === "production";
|
||||
// Disable all requests to the server in prod for now.
|
||||
if (!isProdEnv) {
|
||||
if (isProd) {
|
||||
return new HTTPException(504, {
|
||||
message: "Open SWE temporarily disabled.",
|
||||
}) as any;
|
||||
|
|
@ -108,8 +108,6 @@ export const auth = new Auth()
|
|||
};
|
||||
}
|
||||
|
||||
const isProd = process.env.NODE_ENV === "production";
|
||||
|
||||
const ghSecretHashHeader = request.headers.get("X-Hub-Signature-256");
|
||||
if (ghSecretHashHeader) {
|
||||
// This will either return a valid user, or throw an error
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue