Skip to content
This repository has been archived by the owner on Sep 8, 2024. It is now read-only.

Commit

Permalink
feat: Update default headers in ProxyHandler
Browse files Browse the repository at this point in the history
The code changes update the default headers in the `ProxyHandler` function in the `handler.go` file. The `Referer` header is changed to `"https://scansmangas.me"` when the `urlString` has a prefix of `"https://scansmangas.me"`. This change improves the handling of requests to the `scansmangas.me` domain.

Note: Please remove any meta information like issue references, tags, or author names from the commit message.
  • Loading branch information
garder500 committed Aug 25, 2024
1 parent ffc8499 commit c1154cf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/proxy/internal/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ func ProxyHandler(w http.ResponseWriter, r *http.Request) {
return
}
defaultHeaders := r.Header.Clone()
if strings.HasPrefix(urlString, "https://scansmangas.me/") {
if strings.HasPrefix(urlString, "https://scansmangas.me") {
defaultHeaders.Add("Authority", "scansmangas.me")
defaultHeaders.Add("Referer", "https://manga-scan.me/")
defaultHeaders.Add("Referer", "https://scansmangas.me")
}

req, _ := http.NewRequest(r.Method, "", r.Body)
Expand Down

0 comments on commit c1154cf

Please sign in to comment.