mirror of
https://github.com/skidoodle/safebin.git
synced 2026-04-28 03:07:41 +02:00
fix: relax chunk limits, support proxies, optimize reads
Signed-off-by: skidoodle <contact@albert.lol>
This commit is contained in:
@@ -72,9 +72,12 @@ func (app *App) RespondWithLink(writer http.ResponseWriter, request *http.Reques
|
||||
return
|
||||
}
|
||||
|
||||
scheme := "https"
|
||||
if request.TLS == nil {
|
||||
scheme = "http"
|
||||
scheme := request.Header.Get("X-Forwarded-Proto")
|
||||
if scheme == "" {
|
||||
scheme = "https"
|
||||
if request.TLS == nil {
|
||||
scheme = "http"
|
||||
}
|
||||
}
|
||||
|
||||
if _, err := fmt.Fprintf(writer, "%s://%s\n", scheme, link); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user