Merge pull request #455 from ThePirateWhoSmellsOfSunflowers/add-proxy-headers
Add HTTP headers to avoid proxy cachingmdns
commit
1ad0e12b80
|
@ -97,7 +97,7 @@ class Listener:
|
|||
'Value' : ''
|
||||
},
|
||||
'ServerVersion' : {
|
||||
'Description' : 'TServer header for the control server.',
|
||||
'Description' : 'Server header for the control server.',
|
||||
'Required' : True,
|
||||
'Value' : 'Microsoft-IIS/7.5'
|
||||
}
|
||||
|
@ -697,6 +697,15 @@ def send_message(packets=None):
|
|||
return response
|
||||
|
||||
|
||||
@app.after_request
|
||||
def add_proxy_headers(response):
|
||||
"Add HTTP headers to avoid proxy caching."
|
||||
response.headers['Cache-Control'] = "no-cache, no-store, must-revalidate"
|
||||
response.headers['Pragma'] = "no-cache"
|
||||
response.headers['Expires'] = "0"
|
||||
return response
|
||||
|
||||
|
||||
@app.route('/<path:request_uri>', methods=['GET'])
|
||||
def handle_get(request_uri):
|
||||
"""
|
||||
|
|
|
@ -98,7 +98,7 @@ class Listener:
|
|||
'Value' : ''
|
||||
},
|
||||
'ServerVersion' : {
|
||||
'Description' : 'TServer header for the control server.',
|
||||
'Description' : 'Server header for the control server.',
|
||||
'Required' : True,
|
||||
'Value' : 'Microsoft-IIS/7.5'
|
||||
}
|
||||
|
@ -469,6 +469,15 @@ class Listener:
|
|||
return response
|
||||
|
||||
|
||||
@app.after_request
|
||||
def add_proxy_headers(response):
|
||||
"Add HTTP headers to avoid proxy caching."
|
||||
response.headers['Cache-Control'] = "no-cache, no-store, must-revalidate"
|
||||
response.headers['Pragma'] = "no-cache"
|
||||
response.headers['Expires'] = "0"
|
||||
return response
|
||||
|
||||
|
||||
@app.route('/<path:request_uri>', methods=['GET'])
|
||||
def handle_get(request_uri):
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue