fix(api): allow cors
This commit is contained in:
parent
3b6cca1b08
commit
36fe7b5e15
1 changed files with 2 additions and 0 deletions
|
@ -128,6 +128,8 @@ func generateJSON(ip string) (body, error) {
|
|||
}
|
||||
|
||||
func handleRequest(w http.ResponseWriter, r *http.Request) {
|
||||
w.Header().Add("Access-Control-Allow-Origin", "*")
|
||||
|
||||
sourceIP := func() string {
|
||||
if q := r.URL.Query().Get("q"); q != "" {
|
||||
return q
|
||||
|
|
Loading…
Reference in a new issue