headers.go 813 B

12345678910111213141516171819202122232425262728
  1. package http
  2. import (
  3. stdHttp "net/http"
  4. )
  5. func Headers() stdHttp.Header {
  6. headers := make(stdHttp.Header)
  7. // https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers
  8. headers.Set("Accept", "*/*")
  9. headers.Set("Accept-Encoding", "gzip, deflate, br, zstd")
  10. headers.Set("Accept-Language", "en-US,en;q=0.9")
  11. headers.Set("Origin", "https://discord.com")
  12. headers.Set("Priority", "u=0, i")
  13. headers.Set("Referer", "https://discord.com/channels/@me")
  14. headers.Set("Sec-Fetch-Dest", "empty")
  15. headers.Set("Sec-Fetch-Mode", "cors")
  16. headers.Set("Sec-Fetch-Site", "same-origin")
  17. headers.Set("X-Debug-Options", "bugReporterEnabled")
  18. headers.Set("X-Discord-Locale", string(Locale))
  19. if superProps, err := superProps(); err == nil {
  20. headers.Set("X-Super-Properties", superProps)
  21. }
  22. return headers
  23. }