mirror of
https://github.com/github/codeql.git
synced 2026-08-02 16:32:58 +02:00
13 lines
228 B
Go
13 lines
228 B
Go
package main
|
|
|
|
import (
|
|
"net/http"
|
|
)
|
|
|
|
func exampleHandlerGood(w http.ResponseWriter, r *http.Request) {
|
|
// GOOD: the configuration is not user controlled
|
|
if r.Header.Get("Origin") != config.get("Host") {
|
|
//do something
|
|
}
|
|
}
|