Skip to content

Commit

Permalink
chore: allow Access-Control-Allow-Origin when health check
Browse files Browse the repository at this point in the history
  • Loading branch information
fanhousanbu committed Mar 17, 2024
1 parent f1d81e7 commit b392da2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ runtime/
.env
dist/
config.*.toml
config.toml
db/geecaptcha.db
captcha-bot
dict/dec_*
.vscode
.vscode
vendor
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ package main

import (
"fmt"
"net/http"

"github.com/assimon/captcha-bot/bootstrap"
"net/http"
)

func main() {
go func() {
http.HandleFunc("/healthz", func(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Access-Control-Allow-Origin", "*")
fmt.Fprintf(w, "OK")
})
http.ListenAndServe(":80", nil)
Expand Down

0 comments on commit b392da2

Please sign in to comment.