import json RESPONSE = u""" Clear-Site-Data """ # A support server that receives a list of datatypes in the GET query # and returns a Clear-Site-Data header with those datatypes. The content # of the response is a html site using postMessage to report the status # of the datatypes, so that if used in an iframe, it can inform the # embedder whether the data deletion succeeded. def main(request, response): types = [key for key in request.GET.keys()] header = b",".join(b"\"" + type + b"\"" for type in types) return ([(b"Clear-Site-Data", header), (b"Content-Type", b"text/html")], RESPONSE)