package main; import ( "log" "net/http" "fmt" ) func main() { http.HandleFunc("/api/msg", messageHandler); log.Fatal(http.ListenAndServeTLS(":6969", "/etc/letsencrypt/live/ja.hairydiode.xyz/fullchain.pem", "/etc/letsencrypt/live/ja.hairydiode.xyz/privkey.pem", nil)); } func messageHandler(w http.ResponseWriter, r *http.Request) { w.Header().Set("Access-Control-Allow-Origin", "*") fmt.Fprintf(w, "1574466927"); }