aboutsummaryrefslogtreecommitdiffstats
path: root/examples/addons/addheader.py
blob: f4b29268efe3821615a0f3703a230624dfd28c00 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
class AddHeader:
    def __init__(self):
        self.num = 0

    def response(self, flow):
        self.num = self.num + 1
        flow.response.headers["count"] = str(self.num)


addons = [
    AddHeader()
]