MCPcopy Create free account

hub / github.com/corydolphin/flask-cors / functions

Functions195 in github.com/corydolphin/flask-cors

↓ 69 callersMethodget
(self, *args, **kwargs)
tests/base_test.py:49
↓ 41 callersMethoditer_responses
(self, path, verbs=['get', 'head', 'options'], **kwargs)
tests/base_test.py:36
↓ 9 callersMethodpreflight
(self, path, method='GET', cors_request_headers=None, json=True, **kwargs)
tests/base_test.py:70
↓ 8 callersMethod_request
(self, verb, *args, **kwargs)
tests/base_test.py:40
↓ 5 callersFunctionserialize_options
A helper method to serialize and processes the options dictionary.
flask_cors/core.py:353
↓ 4 callersFunctionget_allow_headers
(options, acl_request_headers)
flask_cors/core.py:157
↓ 4 callersMethodoptions
(self, *args, **kwargs)
tests/base_test.py:58
↓ 3 callersFunctionflexible_str
A more flexible str function which intelligently handles stringifying strings, lists and other iterables. The results are lexographically sor
flask_cors/core.py:317
↓ 3 callersFunctionget_regexp_pattern
Helper that returns regexp pattern from given value. :param regexp: regular expression to stringify :type regexp: _sre.SRE_Pattern or st
flask_cors/core.py:94
↓ 3 callersFunctionprobably_regex
(maybe_regex)
flask_cors/core.py:254
↓ 3 callersFunctiontry_match
Safely attempts to match a pattern or string to a request origin.
flask_cors/core.py:275
↓ 2 callersFunctionadd_routes
(app)
tests/decorator/test_exception_interception.py:21
↓ 2 callersFunctionget_cors_options
Compute CORS options for an application by combining the DEFAULT_OPTIONS, the app's configuration-specified options and any dictionaries pass
flask_cors/core.py:288
↓ 2 callersMethodhead
(self, *args, **kwargs)
tests/base_test.py:52
↓ 2 callersFunctionparse_resources
(resources)
flask_cors/core.py:62
↓ 2 callersFunctionre_fix
Replace the invalid regex r'*' with the valid, wildcard regex r'/.*' to enable the CORS app extension to have a more user friendly ap
flask_cors/core.py:263
↓ 2 callersFunctionset_cors_headers
Performs the actual evaluation of Flask-CORS options and actually modifies the response object. This function is used both in the decora
flask_cors/core.py:224
↓ 2 callersFunctiontry_match_any
(inst, patterns)
flask_cors/core.py:271
↓ 1 callersMethodassertHasACLOrigin
(self, resp, origin=None)
tests/base_test.py:82
↓ 1 callersFunctioncors_after_request
(resp)
flask_cors/extension.py:186
↓ 1 callersFunctionensure_iterable
Wraps scalars or string types as a list, or returns the iterable instance.
flask_cors/core.py:338
↓ 1 callersFunctionget_app_kwarg_dict
Returns the dictionary of CORS specific app configurations.
flask_cors/core.py:303
↓ 1 callersFunctionget_cors_headers
(options, request_headers, request_method)
flask_cors/core.py:172
↓ 1 callersFunctionget_cors_origins
(options, request_origin)
flask_cors/core.py:109
↓ 1 callersMethodinit_app
(self, app, **kwargs)
flask_cors/extension.py:146
↓ 1 callersFunctionmake_after_request_function
(resources)
flask_cors/extension.py:185
↓ 1 callersFunctionsanitize_regex_param
(param)
flask_cors/core.py:349
↓ 1 callersFunctionserialize_option
(options_dict, key, upper=False)
flask_cors/core.py:332
Method__init__
(self, app=None, **kwargs)
flask_cors/extension.py:141
Method_after_request_decorator
(f)
flask_cors/extension.py:174
MethodallowOrigins
This sets up flask-cors to echo the request's `Origin` header, only if it is actually set. This behavior is most similar to
tests/decorator/test_w3.py:24
Methodcatch_all_handler
This error handler catches 404s and 500s and returns status 200 no matter what. It is not a good handler.
tests/decorator/test_exception_interception.py:126
Methodcatch_all_handler
This error handler catches 404s and 500s and returns status 200 no matter what. It is not a good handler.
tests/decorator/test_exception_interception.py:177
Functioncreate_user
Since the path matches the regular expression r'/api/*', this resource automatically has CORS headers set. Browsers will fir
examples/blueprints_based_example.py:52
Functioncreate_user
Since the path matches the regular expression r'/api/*', this resource automatically has CORS headers set. Browsers will fir
examples/app_based_example.py:76
Functioncross_origin
This function is the decorator which is used to wrap a Flask route with. In the simplest case, simply use the default parameters to allow all
flask_cors/decorator.py:20
Functioncross_origin_json_post
This view has CORS enabled for all domains, and allows browsers to send the Content-Type header, allowing cross domain AJAX POST
examples/view_based_example.py:57
Functiondecorator
(f)
flask_cors/decorator.py:108
Methoddefaults
()
tests/decorator/test_methods.py:25
Methoddefaults
()
tests/decorator/test_max_age.py:25
Methoddelete
(self, *args, **kwargs)
tests/base_test.py:67
Methodexample
()
tests/extension/test_app_extension.py:353
Methodexposed1
()
tests/extension/test_app_extension.py:180
Methodexposed1
()
tests/extension/test_app_extension.py:212
Methodexposed2
()
tests/extension/test_app_extension.py:184
Methodexposed2
()
tests/extension/test_app_extension.py:216
Methodfoo_txt
()
tests/extension/test_app_extension.py:229
Functionget_exception
Since the path matches the regular expression r'/api/*', this resource automatically has CORS headers set. Browsers will fir
examples/app_based_example.py:119
Methodget_with_origins
(path)
tests/decorator/test_exception_interception.py:144
Methodget_with_origins
(path)
tests/decorator/test_exception_interception.py:194
FunctionhelloWorld
This view has CORS enabled for all domains, representing the simplest configuration of view-based decoration. The expected result is
examples/view_based_example.py:29
FunctionhelloWorld
Since the path '/' does not match the regular expression r'/api/*', this route does not have CORS headers set.
examples/blueprints_based_example.py:97
FunctionhelloWorld
Since the path '/' does not match the regular expression r'/api/*', this route does not have CORS headers set.
examples/app_based_example.py:36
Methodindex
()
tests/core/test_override_headers.py:21
Methodindex
()
tests/extension/test_app_extension.py:225
Methodindex
()
tests/extension/test_app_extension.py:283
Methodindex
()
tests/extension/test_app_extension.py:299
Methodindex
()
tests/extension/test_app_extension.py:349
Methodindex
()
tests/extension/test_app_extension.py:374
Methoditer_verbs
A simple helper method to iterate through a range of HTTP Verbs and return the test_client bound instance, keeping writing ou
tests/base_test.py:28
Functionlist_users
Since the path matches the regular expression r'/api/*', this resource automatically has CORS headers set. The expected result is as
examples/blueprints_based_example.py:28
Functionlist_users
Since the path matches the regular expression r'/api/*', this resource automatically has CORS headers set. The expected result is as
examples/app_based_example.py:52
MethodnoWildcard
With the default origins configuration, send_wildcard should still be respected.
tests/decorator/test_w3.py:35
Methodoverridden
()
tests/extension/test_app_extension.py:221
Methodpatch
(self, *args, **kwargs)
tests/base_test.py:64
Functionpattern_length
(pair)
flask_cors/core.py:71
Methodpost
(self, *args, **kwargs)
tests/base_test.py:55
Methodput
(self, *args, **kwargs)
tests/base_test.py:61
Methodsend_wildcard_with_origin
()
tests/extension/test_app_extension.py:53
Functionserver_error
(e)
examples/app_based_example.py:144
MethodsetUp
(self)
tests/decorator/test_duplicate_headers.py:17
MethodsetUp
(self)
tests/decorator/test_allow_headers.py:16
MethodsetUp
(self)
tests/decorator/test_vary_header.py:20
MethodsetUp
(self)
tests/decorator/test_expose_headers.py:17
MethodsetUp
(self)
tests/decorator/test_credentials.py:20
MethodsetUp
(self)
tests/decorator/test_methods.py:20
MethodsetUp
(self)
tests/decorator/test_w3.py:19
MethodsetUp
(self)
tests/decorator/test_options.py:20
MethodsetUp
(self)
tests/decorator/test_exception_interception.py:42
MethodsetUp
(self)
tests/decorator/test_exception_interception.py:158
MethodsetUp
(self)
tests/decorator/test_max_age.py:20
MethodsetUp
(self)
tests/decorator/test_origins.py:21
MethodsetUp
(self)
tests/core/test_override_headers.py:16
MethodsetUp
(self)
tests/extension/test_app_extension.py:22
MethodsetUp
(self)
tests/extension/test_app_extension.py:170
MethodsetUp
(self)
tests/extension/test_app_extension.py:204
MethodsetUp
(self)
tests/extension/test_app_extension.py:292
MethodshortDescription
Get's the one liner description to be displayed. Source: http://erikzaadi.com/2012/09/13/inheritance-within-python-unit-tests
tests/base_test.py:19
Functiontest_acl_abort_404
()
tests/decorator/test_exception_interception.py:24
Methodtest_acl_abort_404
HTTP Responses generated by calling abort are handled identically to normal responses, and should be wrapped by CORS headers
tests/decorator/test_exception_interception.py:49
Functiontest_acl_abort_500
()
tests/decorator/test_exception_interception.py:29
Methodtest_acl_abort_500
HTTP Responses generated by calling abort are handled identically to normal responses, and should be wrapped by CORS headers
tests/decorator/test_exception_interception.py:70
Methodtest_acl_exception_with_error_handler
If a 500 handler is setup by the user, responses should have CORS matching rules applied, regardless of whether or not
tests/decorator/test_exception_interception.py:116
Methodtest_acl_exception_with_error_handler
If a 500 handler is setup by the user, responses should have CORS matching rules applied, regardless of whether or not
tests/decorator/test_exception_interception.py:167
Functiontest_acl_uncaught_exception_500
()
tests/decorator/test_exception_interception.py:33
Methodtest_acl_uncaught_exception_500
Uncaught exceptions will trigger Flask's internal exception handler, and should have ACL headers only if intercept_exceptions
tests/decorator/test_exception_interception.py:90
Methodtest_acl_uncaught_exception_500
Uncaught exceptions will trigger Flask's internal exception handler, and should have ACL headers only if intercept_exceptions
tests/decorator/test_exception_interception.py:208
Methodtest_allow_headers
()
tests/decorator/test_allow_headers.py:27
Methodtest_allow_headers_no_request_headers
No ACL_REQUEST_HEADERS sent, ACL_ALLOW_HEADERS should be empty
tests/decorator/test_allow_headers.py:40
Methodtest_allow_headers_regex
()
tests/decorator/test_allow_headers.py:32
next →1–100 of 195, ranked by callers