#!/usr/bin/env python from libmproxy import script def response(ctx, f): ctx.log("processing a response") f.response.headers["newheader"] = ["foo"]