diff options
author | Jenkins <jenkins@review.openstack.org> | 2016-10-17 03:38:44 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2016-10-17 03:38:44 +0000 |
commit | 7563191932725462ad9674cd750c15a58d1d8c8f (patch) | |
tree | 14400b11bd0a5a4080801a584fc0b0782f086c55 | |
parent | 11b2704b7573464d0111576ab10ef00d4e5e72d4 (diff) | |
parent | e9c3a23e845d8c53b266a3b2e4ca7fb0a5a0425a (diff) | |
download | oslo-middleware-7563191932725462ad9674cd750c15a58d1d8c8f.tar.gz |
Merge "Deprecated set_latent"
-rw-r--r-- | doc/source/cors.rst | 18 | ||||
-rw-r--r-- | oslo_middleware/cors.py | 4 |
2 files changed, 4 insertions, 18 deletions
diff --git a/doc/source/cors.rst b/doc/source/cors.rst index 765a681..ea19d9e 100644 --- a/doc/source/cors.rst +++ b/doc/source/cors.rst @@ -55,18 +55,6 @@ something like this:: allow_headers=X-Custom-Header expose_headers=X-Custom-Header -If your software requires specific headers or methods for proper operation, you -may include these as latent properties. These will be evaluated in addition -to any found in configuration:: - - from oslo_middleware import cors - - app = cors.CORS(your_wsgi_application) - app.set_latent(allow_headers=['X-System-Header'], - expose_headers=['X-System-Header'], - allow_methods=['GET','PATCH']) - - Configuration for pastedeploy ----------------------------- @@ -92,12 +80,6 @@ configuration, this may be done as follows.:: # Optional field, in case the program name is different from the project: oslo_config_program = oslo_project_name-api - # This method also permits setting latent properties, for any origins set - # in oslo config. - latent_allow_headers=X-Auth-Token - latent_expose_headers=X-Auth-Token - latent_methods=GET,PUT,POST - Configuration Options --------------------- diff --git a/oslo_middleware/cors.py b/oslo_middleware/cors.py index 9da5d24..b53ad45 100644 --- a/oslo_middleware/cors.py +++ b/oslo_middleware/cors.py @@ -13,6 +13,7 @@ # limitations under the License. import copy +from debtcollector import moves import logging import debtcollector @@ -245,6 +246,9 @@ class CORS(base.ConfigurableMiddleware): 'allow_headers': allow_headers } + @moves.moved_method('set_defaults', + message='CORS.set_latent has been deprecated in favor ' + 'of oslo_middleware.cors.set_defaults') def set_latent(self, allow_headers=None, allow_methods=None, expose_headers=None): '''Add a new latent property for this middleware. |