Last active
August 11, 2022 19:33
-
-
Save jkopczyn/068fd2edd8d259a94d18e0229030d629 to your computer and use it in GitHub Desktop.
server to make datadog SubmitMetrics crash
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"github.com/sirupsen/logrus" | |
"net/http" | |
) | |
func serveHTTP(wr http.ResponseWriter, req *http.Request) { | |
http.Error(wr, "Client Error: Headers", http.StatusOK) | |
} | |
func main() { | |
mux := http.NewServeMux() | |
mux.HandleFunc("/", serveHTTP) | |
logrus.Info("Server online...") | |
logrus.Fatal("ListenAndServe:", http.ListenAndServe(":80", mux)) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment