mirror of
				https://github.com/9001/copyparty.git
				synced 2025-11-04 05:43:17 +00:00 
			
		
		
		
	new cloudflare memes, thx nh
This commit is contained in:
		@@ -926,7 +926,7 @@ class HttpCli(object):
 | 
			
		||||
        except:
 | 
			
		||||
            raise Pebkac(422, "you POSTed invalid json")
 | 
			
		||||
 | 
			
		||||
        # self.reply(b" DD" + b"oS Protection ", 503)
 | 
			
		||||
        # self.reply(b"cloudflare", 503)
 | 
			
		||||
        # return True
 | 
			
		||||
 | 
			
		||||
        if "srch" in self.uparam or "srch" in body:
 | 
			
		||||
 
 | 
			
		||||
@@ -1533,13 +1533,13 @@ function xhrchk(xhr, prefix, e404) {
 | 
			
		||||
    var errtxt = (xhr.response && xhr.response.err) || xhr.responseText,
 | 
			
		||||
        fun = toast.err;
 | 
			
		||||
 | 
			
		||||
    if (xhr.status == 503 && /\bDD(?:wah){0}[o]S [Pp]rote[c]tion|>Just a mo[m]ent|#cf-b[u]bbles|Chec[k]ing your br[o]wser/.test(errtxt)) {
 | 
			
		||||
    if (xhr.status == 503 && /[Cc]loud[f]lare|>Just a mo[m]ent|#cf-b[u]bbles|Chec[k]ing your br[o]wser/.test(errtxt)) {
 | 
			
		||||
        var now = Date.now(), td = now - cf_cha_t;
 | 
			
		||||
        if (td < 15000)
 | 
			
		||||
            return;
 | 
			
		||||
 | 
			
		||||
        cf_cha_t = now;
 | 
			
		||||
        errtxt = 'Cloudflare DD' + wah + 'oS protection kicked in\n\n<strong>trying to fix it...</strong>';
 | 
			
		||||
        errtxt = 'Clou' + wah + 'dflare protection kicked in\n\n<strong>trying to fix it...</strong>';
 | 
			
		||||
        fun = toast.warn;
 | 
			
		||||
 | 
			
		||||
        qsr('#cf_frame');
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user