mirror of
https://github.com/9001/copyparty.git
synced 2025-12-27 10:15:16 -05:00
more hints for invalid config
This commit is contained in:
@@ -785,7 +785,7 @@ class HttpCli(object):
|
||||
guess = "modifying" if (origin and host) else "stripping"
|
||||
t = "cors-reject %s because request-header Origin=%r does not match request-protocol %r and host %r based on request-header Host=%r (note: if this request is not malicious, check if your reverse-proxy is accidentally %s request headers, in particular 'Origin', for example by running copyparty with --ihead='*' to show all request headers)"
|
||||
self.log(t % (self.mode, origin, proto, self.host, host, guess), 3)
|
||||
raise Pebkac(403, "rejected by cors-check")
|
||||
raise Pebkac(403, "rejected by cors-check (see serverlog)")
|
||||
|
||||
# getattr(self.mode) is not yet faster than this
|
||||
if self.mode == "POST":
|
||||
@@ -931,7 +931,7 @@ class HttpCli(object):
|
||||
return False
|
||||
|
||||
self.log("banned for {:.0f} sec".format(rt), 6)
|
||||
self.terse_reply(b"thank you for playing", 403)
|
||||
self.terse_reply(b"thank you for playing (see serverlog and readme)", 403)
|
||||
return True
|
||||
|
||||
def permit_caching(self) -> None:
|
||||
|
||||
Reference in New Issue
Block a user