Skip to content

panther_client ¤

PFVClient ¤

PFVClient(dir_path=None)
Source code in panther/panther_worker/app/panther_client.py
26
27
def __init__(self, dir_path=None):
    pass

add_header ¤

add_header(r)

It sets the cache control headers to prevent caching

:param r: The response object :return: the response object with the headers added.

Source code in panther/panther_worker/app/panther_client.py
83
84
85
86
87
88
89
90
91
92
93
94
95
@app.after_request
def add_header(r):
    """
    It sets the cache control headers to prevent caching

    :param r: The response object
    :return: the response object with the headers added.
    """
    r.headers["Cache-Control"] = "no-cache, no-store, must-revalidate"
    r.headers["Pragma"] = "no-cache"
    r.headers["Expires"] = "0"
    r.headers["Cache-Control"] = "public, max-age=0"
    return r