Created
April 7, 2018 18:16
-
-
Save blainegarrett/4d3b3081d09b4ff7be00765eb32b0d94 to your computer and use it in GitHub Desktop.
App Engine SDK OPTIONS /_ah/upload/ hack
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if environ['REQUEST_METHOD'] == 'OPTIONS' and environ['REQUEST_URI'][0:12] == '/_ah/upload/': | |
logging.warning("Hacked OPTIONS request for /_ah/upload - see module.828") | |
wrapped_start_response('200 SUPER GREAT', | |
[ | |
('Access-Control-Allow-Origin', '*'), | |
('Access-Control-Allow-Methods', 'GET, POST, PUT, DELETE'), | |
('Access-Control-Allow-Credentials', 'true'), | |
('Content-Type', 'application/json'), | |
('Access-Control-Allow-Headers', '*'), | |
]) | |
return "HACKED SDK OPTIONS CALL" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add to SDK_ROOT/platform/google_appengine/google/appengine/tools/devappserver2/module.py::_handle_request near line 827 (after def of wrapped_start_response)