Skip to content

Commit

Permalink
Merge pull request #213 from TurtIeSocks/empty-secret-support
Browse files Browse the repository at this point in the history
feat: add support for empty secret
  • Loading branch information
TurtIeSocks authored Dec 12, 2023
2 parents a6449cd + 0f18c82 commit 0f93bbc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions server/api/src/utils/auth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ pub async fn public_validator(
if logged_in(&req) {
return Ok(req);
}
if env::var("KOJI_SECRET").unwrap_or("".to_string()).is_empty() {
return Ok(req);
}
if let Some(credentials) = credentials {
if credentials.token() == env::var("KOJI_SECRET").unwrap_or("".to_string()) {
return Ok(req);
Expand Down

1 comment on commit 0f93bbc

@vercel
Copy link

@vercel vercel bot commented on 0f93bbc Dec 12, 2023

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

koji – ./

koji.vercel.app
koji-turtiesocks.vercel.app
koji-git-main-turtiesocks.vercel.app

Please sign in to comment.