Skip to content
This repository has been archived by the owner on Mar 20, 2024. It is now read-only.

Commit

Permalink
redirect to github if open directly to avoid issues from non-tech use…
Browse files Browse the repository at this point in the history
…rs (#173)
  • Loading branch information
linweiyuan committed Jun 21, 2023
1 parent c7d8407 commit 7db83cb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion middleware/check_header.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ func CheckHeaderMiddleware() gin.HandlerFunc {
c.Request.URL.Path != "/platform/login" &&
c.Request.URL.Path != "/healthCheck" &&
c.Request.URL.Path != "/chatgpt/public-api/conversation_limit" {
c.AbortWithStatusJSON(http.StatusUnauthorized, api.ReturnMessage("Hello World."))
c.Redirect(http.StatusMovedPermanently, "https://github.com/linweiyuan/go-chatgpt-api")
c.Abort()
return
}

Expand Down

0 comments on commit 7db83cb

Please sign in to comment.