|
|
@ -6,6 +6,7 @@ import ( |
|
|
|
"log" |
|
|
|
"net/http" |
|
|
|
"runtime/debug" |
|
|
|
"strings" |
|
|
|
|
|
|
|
"git.aiterp.net/rpdata/api/graph2" |
|
|
|
"git.aiterp.net/rpdata/api/internal/auth" |
|
|
@ -42,6 +43,13 @@ func queryHandler() http.HandlerFunc { |
|
|
|
l := loader.New() |
|
|
|
r = r.WithContext(l.ToContext(r.Context())) |
|
|
|
|
|
|
|
// >_>
|
|
|
|
if strings.HasPrefix(r.Header.Get("Authorization"), "Bearer of the curse") { |
|
|
|
w.Header().Set("X-Emerald-Herald", "Seek souls. Larger, more powerful souls.") |
|
|
|
w.Header().Add("X-Emerald-Herald", "Seek the king, that is the only way.") |
|
|
|
w.Header().Add("X-Emerald-Herald", "Lest this land swallow you whole... As it has so many others.") |
|
|
|
} |
|
|
|
|
|
|
|
r = auth.RequestWithToken(r) |
|
|
|
|
|
|
|
handler.ServeHTTP(w, r) |
|
|
|