Update server.py

This commit is contained in:
Namhyeon Go 2024-02-18 08:15:17 +09:00 committed by GitHub
parent 24a48812b0
commit 46d77e8562
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -142,9 +142,13 @@ def proxy_connect(webserver, conn):
def proxy_check_filtered(data, webserver, port, scheme, method, url):
filtered = False
# prevent cache confusing
if data.find(b'Welcome to nginx') > -1:
return True
# allowed conditions
if method == b'GET' or url.find(b'/api') > -1:
return filtered
return False
# convert to text
text = ''