diff options
Diffstat (limited to 'examples/add_header.py')
-rw-r--r-- | examples/add_header.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/examples/add_header.py b/examples/add_header.py new file mode 100644 index 00000000..dab33c8c --- /dev/null +++ b/examples/add_header.py @@ -0,0 +1,8 @@ +#!/usr/bin/env python +""" + This script adds a new header to all responses. +""" +from libmproxy import script + +def response(ctx, f): + f.response.headers["newheader"] = ["foo"] |