script-with-header.py (286B)
1 def main(request, response): 2 headers = [(b"Content-type", request.GET.first(b"mime"))] 3 if b"content" in request.GET and request.GET.first(b"content") == b"empty": 4 content = b'' 5 else: 6 content = b"console.log('Script loaded')" 7 return 200, headers, content