werkzeug.Response.autocorrect_location_header

Response.autocorrect_location_header = True