)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"b0b9a7018b787437f2523c681b0ff9c4fb315993","unresolved":false,"context_lines":[{"line_number":18,"context_line":"3. has a simpler factory setup."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Change-Id: Iecfdd9f0fe45f1e7d61dee0a4763f253dceac11a"},{"line_number":21,"context_line":"Closes-Bug: 987044"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":15,"id":"baa201ad_233887ee","line":21,"updated":"2014-10-15 16:25:53.000000000","message":"can you associate with bp as well\n\nImplements: blueprint cors-middleware","commit_id":"fbaee73d8fdbab9c4d5663cf530d835a92cfa1ef"}],"oslo/middleware/__init__.py":[{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"4fc66b8c91d3096606d9f113aa8c8ec51b2a8e3e","unresolved":false,"context_lines":[{"line_number":11,"context_line":"#    under the License."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"__all__ \u003d [\u0027CatchErrors\u0027,"},{"line_number":14,"context_line":"           \u0027CorrelationId\u0027,"},{"line_number":15,"context_line":"           \u0027Debug\u0027,"},{"line_number":16,"context_line":"           \u0027RequestId\u0027,"},{"line_number":17,"context_line":"           \u0027RequestBodySizeLimiter\u0027]"}],"source_content_type":"text/x-python","patch_set":14,"id":"baa201ad_a07b3b79","line":14,"updated":"2014-10-08 20:06:22.000000000","message":"you\u0027ll need to add CORS here too.","commit_id":"693be503cc786db8f428f73e5ad4bff967d69bbe"},{"author":{"_account_id":12071,"name":"Richard Jones","email":"r1chardj0n3s@gmail.com","username":"richard"},"change_message_id":"644051c8ca7731d43d8fbef0064b8a371557517c","unresolved":false,"context_lines":[{"line_number":11,"context_line":"#    under the License."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"__all__ \u003d [\u0027CatchErrors\u0027,"},{"line_number":14,"context_line":"           \u0027CorrelationId\u0027,"},{"line_number":15,"context_line":"           \u0027Debug\u0027,"},{"line_number":16,"context_line":"           \u0027RequestId\u0027,"},{"line_number":17,"context_line":"           \u0027RequestBodySizeLimiter\u0027]"}],"source_content_type":"text/x-python","patch_set":14,"id":"baa201ad_494a9456","line":14,"in_reply_to":"baa201ad_a07b3b79","updated":"2014-10-10 05:28:02.000000000","message":"Actually, it\u0027s only required to support \"from oslo.middleware import *\" which isn\u0027t the use-case for this package. I\u0027ll add it anyway though.","commit_id":"693be503cc786db8f428f73e5ad4bff967d69bbe"}],"oslo/middleware/cors.py":[{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"feeb7e477bc9afd111052ef843316380457d16a6","unresolved":false,"context_lines":[{"line_number":120,"context_line":"            LOG.info(\u0027Hijacking OPTIONS\u0027)"},{"line_number":121,"context_line":"            return self.process_response(request, webob.Response())"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"    def process_response(self, request, response):"},{"line_number":124,"context_line":"        \"\"\"Add the CORS headers to the response if the request was CORS.\"\"\""},{"line_number":125,"context_line":"        if \u0027Origin\u0027 not in request.headers:"},{"line_number":126,"context_line":"            return response"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa98f980_6fc7c298","line":123,"updated":"2014-09-12 08:29:17.000000000","message":"@staticmethod","commit_id":"fdb9c5da4c33aa90f52138e626140c860346dd51"},{"author":{"_account_id":7069,"name":"Joshua Hesketh","email":"josh@nitrotech.org","username":"jhesketh"},"change_message_id":"2982d22f0d08e6d061c3104aebd4e0390fee199b","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2011-2013 OpenStack Foundation."},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa98f980_7d2472b2","line":1,"updated":"2014-09-17 01:56:04.000000000","message":"This probably isn\u0027t right...","commit_id":"3a9ec278cc146f4a591e053b6ad82ebfe8af2bb3"},{"author":{"_account_id":12071,"name":"Richard Jones","email":"r1chardj0n3s@gmail.com","username":"richard"},"change_message_id":"e45c626a2fbe4316186caf82b867fdf5435b2cd0","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2011-2013 OpenStack Foundation."},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa98f980_bdf17a03","line":1,"in_reply_to":"fa98f980_7d2472b2","updated":"2014-09-17 02:08:46.000000000","message":"Done","commit_id":"3a9ec278cc146f4a591e053b6ad82ebfe8af2bb3"},{"author":{"_account_id":7069,"name":"Joshua Hesketh","email":"josh@nitrotech.org","username":"jhesketh"},"change_message_id":"6f1892a04ea23650850085d77fe2bf9598688e7e","unresolved":false,"context_lines":[{"line_number":45,"context_line":"And then in keystone.conf settings::"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    [cors]"},{"line_number":48,"context_line":"    ## Allowed origins. Either a single wildcard, or a comma delimited list of"},{"line_number":49,"context_line":"    ## origins. Origins are specified as the triple {protocol, host, port}."},{"line_number":50,"context_line":"    ## Origins don\u0027t support wildcards or partial matches."},{"line_number":51,"context_line":"    ## To completely disallow CORS, use \"null\" here, which is the default."}],"source_content_type":"text/x-python","patch_set":6,"id":"fa98f980_4cec5af4","line":48,"updated":"2014-09-17 08:01:34.000000000","message":"(nit) It\u0027d be handy to specify that a wildcard is simply \u0027*\u0027.\n\nThe RFC actually has a space delimited list of origins:\nhttp://www.w3.org/TR/cors/#access-control-allow-origin-response-header\n\nNot that you\u0027re explicitly writing out the headers here though..\n\n(edit) ah, I see it\u0027s because you\u0027re using the ListOpt\u0027s. This seems sensible.","commit_id":"e9d1ef184220be9b2498a2101e6e3ae699ecc430"},{"author":{"_account_id":12071,"name":"Richard Jones","email":"r1chardj0n3s@gmail.com","username":"richard"},"change_message_id":"c52225b83dc3be7e37b0ec3b40edd39bdd8940fb","unresolved":false,"context_lines":[{"line_number":45,"context_line":"And then in keystone.conf settings::"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    [cors]"},{"line_number":48,"context_line":"    ## Allowed origins. Either a single wildcard, or a comma delimited list of"},{"line_number":49,"context_line":"    ## origins. Origins are specified as the triple {protocol, host, port}."},{"line_number":50,"context_line":"    ## Origins don\u0027t support wildcards or partial matches."},{"line_number":51,"context_line":"    ## To completely disallow CORS, use \"null\" here, which is the default."}],"source_content_type":"text/x-python","patch_set":6,"id":"baa201ad_301788a5","line":48,"in_reply_to":"fa98f980_4cec5af4","updated":"2014-09-29 01:21:54.000000000","message":"Done","commit_id":"e9d1ef184220be9b2498a2101e6e3ae699ecc430"},{"author":{"_account_id":7069,"name":"Joshua Hesketh","email":"josh@nitrotech.org","username":"jhesketh"},"change_message_id":"6f1892a04ea23650850085d77fe2bf9598688e7e","unresolved":false,"context_lines":[{"line_number":58,"context_line":"    ## A comma separated list of headers the client is allowed to customize."},{"line_number":59,"context_line":"    ## This is sent to the browser as-is."},{"line_number":60,"context_line":"    # allow_headers \u003d Origin, Content-type, Accept, X-Auth-Token"},{"line_number":61,"context_line":"    ## Whether the browser allows the app developper to send credentials."},{"line_number":62,"context_line":"    ## This is sent to the browser as-is."},{"line_number":63,"context_line":"    # allow_credentials \u003d false"},{"line_number":64,"context_line":"    ## Whether this middleware responds to pre-flight OPTIONS requests. If you"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa98f980_0c90924d","line":61,"updated":"2014-09-17 08:01:34.000000000","message":"s/developper/developer","commit_id":"e9d1ef184220be9b2498a2101e6e3ae699ecc430"},{"author":{"_account_id":12071,"name":"Richard Jones","email":"r1chardj0n3s@gmail.com","username":"richard"},"change_message_id":"c52225b83dc3be7e37b0ec3b40edd39bdd8940fb","unresolved":false,"context_lines":[{"line_number":58,"context_line":"    ## A comma separated list of headers the client is allowed to customize."},{"line_number":59,"context_line":"    ## This is sent to the browser as-is."},{"line_number":60,"context_line":"    # allow_headers \u003d Origin, Content-type, Accept, X-Auth-Token"},{"line_number":61,"context_line":"    ## Whether the browser allows the app developper to send credentials."},{"line_number":62,"context_line":"    ## This is sent to the browser as-is."},{"line_number":63,"context_line":"    # allow_credentials \u003d false"},{"line_number":64,"context_line":"    ## Whether this middleware responds to pre-flight OPTIONS requests. If you"}],"source_content_type":"text/x-python","patch_set":6,"id":"baa201ad_500c0c95","line":61,"in_reply_to":"fa98f980_0c90924d","updated":"2014-09-29 01:21:54.000000000","message":"Done","commit_id":"e9d1ef184220be9b2498a2101e6e3ae699ecc430"},{"author":{"_account_id":7069,"name":"Joshua Hesketh","email":"josh@nitrotech.org","username":"jhesketh"},"change_message_id":"6f1892a04ea23650850085d77fe2bf9598688e7e","unresolved":false,"context_lines":[{"line_number":77,"context_line":"    ## here."},{"line_number":78,"context_line":"    # expose_headers \u003d etag, x-timestamp, x-trans-id, vary"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"To also enable nova API access you would need to add the middleware to the"},{"line_number":81,"context_line":"nova paste configuration and the CORS configuration to nova.conf."},{"line_number":82,"context_line":"\"\"\""},{"line_number":83,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"fa98f980_ec798e31","line":80,"updated":"2014-09-17 08:01:34.000000000","message":"suggestion: \"nova and other service API\u0027s\"","commit_id":"e9d1ef184220be9b2498a2101e6e3ae699ecc430"},{"author":{"_account_id":12071,"name":"Richard Jones","email":"r1chardj0n3s@gmail.com","username":"richard"},"change_message_id":"c52225b83dc3be7e37b0ec3b40edd39bdd8940fb","unresolved":false,"context_lines":[{"line_number":77,"context_line":"    ## here."},{"line_number":78,"context_line":"    # expose_headers \u003d etag, x-timestamp, x-trans-id, vary"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"To also enable nova API access you would need to add the middleware to the"},{"line_number":81,"context_line":"nova paste configuration and the CORS configuration to nova.conf."},{"line_number":82,"context_line":"\"\"\""},{"line_number":83,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"baa201ad_708830e8","line":80,"in_reply_to":"fa98f980_ec798e31","updated":"2014-09-29 01:21:54.000000000","message":"Done","commit_id":"e9d1ef184220be9b2498a2101e6e3ae699ecc430"},{"author":{"_account_id":7069,"name":"Joshua Hesketh","email":"josh@nitrotech.org","username":"jhesketh"},"change_message_id":"6f1892a04ea23650850085d77fe2bf9598688e7e","unresolved":false,"context_lines":[{"line_number":83,"context_line":""},{"line_number":84,"context_line":"settings \u003d ["},{"line_number":85,"context_line":"    cfg.ListOpt(\u0027allow_origins\u0027, default\u003d\u0027null\u0027,"},{"line_number":86,"context_line":"                help\u003d\u0027The allowed origins, duh.\u0027),"},{"line_number":87,"context_line":"    cfg.ListOpt(\u0027allow_methods\u0027, default\u003d\u0027GET, POST, PUT, DELETE, OPTIONS\u0027),"},{"line_number":88,"context_line":"    cfg.StrOpt(\u0027allow_headers\u0027,"},{"line_number":89,"context_line":"               default\u003d\u0027Origin, Content-type, Accept, Accept-Language, \u0027"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa98f980_2c747635","line":86,"updated":"2014-09-17 08:01:34.000000000","message":"Not sure about the necessity of sarcasm here. You could use a description similar to above.\n\nYou have help text here and not the rest?","commit_id":"e9d1ef184220be9b2498a2101e6e3ae699ecc430"},{"author":{"_account_id":12071,"name":"Richard Jones","email":"r1chardj0n3s@gmail.com","username":"richard"},"change_message_id":"c52225b83dc3be7e37b0ec3b40edd39bdd8940fb","unresolved":false,"context_lines":[{"line_number":83,"context_line":""},{"line_number":84,"context_line":"settings \u003d ["},{"line_number":85,"context_line":"    cfg.ListOpt(\u0027allow_origins\u0027, default\u003d\u0027null\u0027,"},{"line_number":86,"context_line":"                help\u003d\u0027The allowed origins, duh.\u0027),"},{"line_number":87,"context_line":"    cfg.ListOpt(\u0027allow_methods\u0027, default\u003d\u0027GET, POST, PUT, DELETE, OPTIONS\u0027),"},{"line_number":88,"context_line":"    cfg.StrOpt(\u0027allow_headers\u0027,"},{"line_number":89,"context_line":"               default\u003d\u0027Origin, Content-type, Accept, Accept-Language, \u0027"}],"source_content_type":"text/x-python","patch_set":6,"id":"baa201ad_f0a6e052","line":86,"in_reply_to":"fa98f980_2c747635","updated":"2014-09-29 01:21:54.000000000","message":"Done","commit_id":"e9d1ef184220be9b2498a2101e6e3ae699ecc430"},{"author":{"_account_id":7069,"name":"Joshua Hesketh","email":"josh@nitrotech.org","username":"jhesketh"},"change_message_id":"6f1892a04ea23650850085d77fe2bf9598688e7e","unresolved":false,"context_lines":[{"line_number":117,"context_line":"                and request.method \u003d\u003d \u0027OPTIONS\u0027:"},{"line_number":118,"context_line":"            # Process the preflight response by just sending an empty \u0027200 OK\u0027"},{"line_number":119,"context_line":"            # Manually alter the response because we short-circuit __call__"},{"line_number":120,"context_line":"            LOG.info(\u0027Hijacking OPTIONS\u0027)"},{"line_number":121,"context_line":"            return self.process_response(request, webob.Response())"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"    @staticmethod"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa98f980_8ce002ce","line":120,"updated":"2014-09-17 08:01:34.000000000","message":"(-1) This is potentially a high frequency log. I\u0027d suggest using debug here.","commit_id":"e9d1ef184220be9b2498a2101e6e3ae699ecc430"},{"author":{"_account_id":12071,"name":"Richard Jones","email":"r1chardj0n3s@gmail.com","username":"richard"},"change_message_id":"c52225b83dc3be7e37b0ec3b40edd39bdd8940fb","unresolved":false,"context_lines":[{"line_number":117,"context_line":"                and request.method \u003d\u003d \u0027OPTIONS\u0027:"},{"line_number":118,"context_line":"            # Process the preflight response by just sending an empty \u0027200 OK\u0027"},{"line_number":119,"context_line":"            # Manually alter the response because we short-circuit __call__"},{"line_number":120,"context_line":"            LOG.info(\u0027Hijacking OPTIONS\u0027)"},{"line_number":121,"context_line":"            return self.process_response(request, webob.Response())"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"    @staticmethod"}],"source_content_type":"text/x-python","patch_set":6,"id":"baa201ad_306868f5","line":120,"in_reply_to":"fa98f980_8ce002ce","updated":"2014-09-29 01:21:54.000000000","message":"Done","commit_id":"e9d1ef184220be9b2498a2101e6e3ae699ecc430"},{"author":{"_account_id":7069,"name":"Joshua Hesketh","email":"josh@nitrotech.org","username":"jhesketh"},"change_message_id":"6f1892a04ea23650850085d77fe2bf9598688e7e","unresolved":false,"context_lines":[{"line_number":135,"context_line":"                # set the header to the single allowed origin"},{"line_number":136,"context_line":"                acao \u003d CONF.cors.allow_origins[0]"},{"line_number":137,"context_line":"            else:"},{"line_number":138,"context_line":"                # rather than choose one non-match at random, just send null"},{"line_number":139,"context_line":"                acao \u003d \u0027null\u0027"},{"line_number":140,"context_line":"        else:"},{"line_number":141,"context_line":"            acao \u003d origin"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa98f980_ac3946f4","line":138,"updated":"2014-09-17 08:01:34.000000000","message":"I wonder if this would be worth logging","commit_id":"e9d1ef184220be9b2498a2101e6e3ae699ecc430"},{"author":{"_account_id":12071,"name":"Richard Jones","email":"r1chardj0n3s@gmail.com","username":"richard"},"change_message_id":"c52225b83dc3be7e37b0ec3b40edd39bdd8940fb","unresolved":false,"context_lines":[{"line_number":135,"context_line":"                # set the header to the single allowed origin"},{"line_number":136,"context_line":"                acao \u003d CONF.cors.allow_origins[0]"},{"line_number":137,"context_line":"            else:"},{"line_number":138,"context_line":"                # rather than choose one non-match at random, just send null"},{"line_number":139,"context_line":"                acao \u003d \u0027null\u0027"},{"line_number":140,"context_line":"        else:"},{"line_number":141,"context_line":"            acao \u003d origin"}],"source_content_type":"text/x-python","patch_set":6,"id":"baa201ad_b07378e6","line":138,"in_reply_to":"fa98f980_ac3946f4","updated":"2014-09-29 01:21:54.000000000","message":"Done","commit_id":"e9d1ef184220be9b2498a2101e6e3ae699ecc430"},{"author":{"_account_id":7069,"name":"Joshua Hesketh","email":"josh@nitrotech.org","username":"jhesketh"},"change_message_id":"2fede32a1bd0038e19ae4eae67534a32c2989545","unresolved":false,"context_lines":[{"line_number":136,"context_line":"                acao \u003d CONF.cors.allow_origins[0]"},{"line_number":137,"context_line":"            else:"},{"line_number":138,"context_line":"                # rather than choose one non-match at random, just send null"},{"line_number":139,"context_line":"                acao \u003d \u0027null\u0027"},{"line_number":140,"context_line":"        else:"},{"line_number":141,"context_line":"            acao \u003d origin"},{"line_number":142,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"fa98f980_2e11cb53","line":139,"updated":"2014-09-17 08:02:28.000000000","message":"actually, why not return all of them space separated as per the spec?","commit_id":"e9d1ef184220be9b2498a2101e6e3ae699ecc430"},{"author":{"_account_id":12071,"name":"Richard Jones","email":"r1chardj0n3s@gmail.com","username":"richard"},"change_message_id":"c52225b83dc3be7e37b0ec3b40edd39bdd8940fb","unresolved":false,"context_lines":[{"line_number":136,"context_line":"                acao \u003d CONF.cors.allow_origins[0]"},{"line_number":137,"context_line":"            else:"},{"line_number":138,"context_line":"                # rather than choose one non-match at random, just send null"},{"line_number":139,"context_line":"                acao \u003d \u0027null\u0027"},{"line_number":140,"context_line":"        else:"},{"line_number":141,"context_line":"            acao \u003d origin"},{"line_number":142,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"baa201ad_d080fc8d","line":139,"in_reply_to":"fa98f980_2e11cb53","updated":"2014-09-29 01:21:54.000000000","message":"Done","commit_id":"e9d1ef184220be9b2498a2101e6e3ae699ecc430"},{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"173c6d0dcd43a2328c13dff284de05b19e7d6152","unresolved":false,"context_lines":[{"line_number":120,"context_line":"        if response is not None:"},{"line_number":121,"context_line":"            return response"},{"line_number":122,"context_line":"        response \u003d request.get_response(self.application)"},{"line_number":123,"context_line":"        return self.process_response(request, response)"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"    def process_request(self, request):"},{"line_number":126,"context_line":"        \"\"\"Optionally hijack OPTIONS requests."}],"source_content_type":"text/x-python","patch_set":9,"id":"baa201ad_3604e014","line":123,"updated":"2014-09-29 03:38:56.000000000","message":"This __call__ definition is not interestingly different to the base.Middleware one. I think you can just delete it.","commit_id":"dd057149e2b78c6323f26b5c7c671342084ca386"},{"author":{"_account_id":12071,"name":"Richard Jones","email":"r1chardj0n3s@gmail.com","username":"richard"},"change_message_id":"9d20773497be0431b6120938056c174dc9bc0579","unresolved":false,"context_lines":[{"line_number":120,"context_line":"        if response is not None:"},{"line_number":121,"context_line":"            return response"},{"line_number":122,"context_line":"        response \u003d request.get_response(self.application)"},{"line_number":123,"context_line":"        return self.process_response(request, response)"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"    def process_request(self, request):"},{"line_number":126,"context_line":"        \"\"\"Optionally hijack OPTIONS requests."}],"source_content_type":"text/x-python","patch_set":9,"id":"baa201ad_361780a5","line":123,"in_reply_to":"baa201ad_3604e014","updated":"2014-09-29 05:40:41.000000000","message":"My process_response had the additional request argument. I\u0027ve re-worked the code to remove that argument.","commit_id":"dd057149e2b78c6323f26b5c7c671342084ca386"},{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"173c6d0dcd43a2328c13dff284de05b19e7d6152","unresolved":false,"context_lines":[{"line_number":128,"context_line":"        Returns None if no-op."},{"line_number":129,"context_line":"        \"\"\""},{"line_number":130,"context_line":"        if \u0027Origin\u0027 in request.headers and CONF.cors.hijack_options \\"},{"line_number":131,"context_line":"                and request.method \u003d\u003d \u0027OPTIONS\u0027:"},{"line_number":132,"context_line":"            # Process the preflight response by just sending an empty \u0027200 OK\u0027"},{"line_number":133,"context_line":"            # Manually alter the response because we short-circuit __call__"},{"line_number":134,"context_line":"            LOG.debug(\u0027Hijacking OPTIONS\u0027)"}],"source_content_type":"text/x-python","patch_set":9,"id":"baa201ad_1318ce83","line":131,"updated":"2014-09-29 03:38:56.000000000","message":"This should also check for the Access-Control-Request-Method header before hijacking (per CORS 7.1.5).","commit_id":"dd057149e2b78c6323f26b5c7c671342084ca386"},{"author":{"_account_id":12071,"name":"Richard Jones","email":"r1chardj0n3s@gmail.com","username":"richard"},"change_message_id":"9d20773497be0431b6120938056c174dc9bc0579","unresolved":false,"context_lines":[{"line_number":128,"context_line":"        Returns None if no-op."},{"line_number":129,"context_line":"        \"\"\""},{"line_number":130,"context_line":"        if \u0027Origin\u0027 in request.headers and CONF.cors.hijack_options \\"},{"line_number":131,"context_line":"                and request.method \u003d\u003d \u0027OPTIONS\u0027:"},{"line_number":132,"context_line":"            # Process the preflight response by just sending an empty \u0027200 OK\u0027"},{"line_number":133,"context_line":"            # Manually alter the response because we short-circuit __call__"},{"line_number":134,"context_line":"            LOG.debug(\u0027Hijacking OPTIONS\u0027)"}],"source_content_type":"text/x-python","patch_set":9,"id":"baa201ad_765f4873","line":131,"in_reply_to":"baa201ad_1318ce83","updated":"2014-09-29 05:40:41.000000000","message":"Well spotted, thanks!","commit_id":"dd057149e2b78c6323f26b5c7c671342084ca386"},{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"173c6d0dcd43a2328c13dff284de05b19e7d6152","unresolved":false,"context_lines":[{"line_number":134,"context_line":"            LOG.debug(\u0027Hijacking OPTIONS\u0027)"},{"line_number":135,"context_line":"            return self.process_response(request, webob.Response())"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"    @staticmethod"},{"line_number":138,"context_line":"    def process_response(request, response):"},{"line_number":139,"context_line":"        \"\"\"Add the CORS headers to the response if the request was CORS.\"\"\""},{"line_number":140,"context_line":"        if \u0027Origin\u0027 not in request.headers:"}],"source_content_type":"text/x-python","patch_set":9,"id":"baa201ad_765ca826","line":137,"updated":"2014-09-29 03:38:56.000000000","message":"The base.Middleware API has this as a regular method, not a staticmethod. Since we\u0027re overriding an ABC, we should follow its calling convention if possible: this shouldn\u0027t be a staticmethod.\n\nI realise that there is a heuristic of \u0027if there are no references to self, make it a staticmethod or a function\u0027, but the consistency argument outweighs that IMO.\n\nMaking a non-inherited form of the base.Middleware API would allow us to write this without these compromises, e.g. as a regular function. Using webob.dec.middleware might do this more directly [but I don\u0027t know the history behind us having our own API, so take that with a grain of salt].","commit_id":"dd057149e2b78c6323f26b5c7c671342084ca386"},{"author":{"_account_id":12071,"name":"Richard Jones","email":"r1chardj0n3s@gmail.com","username":"richard"},"change_message_id":"9d20773497be0431b6120938056c174dc9bc0579","unresolved":false,"context_lines":[{"line_number":134,"context_line":"            LOG.debug(\u0027Hijacking OPTIONS\u0027)"},{"line_number":135,"context_line":"            return self.process_response(request, webob.Response())"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"    @staticmethod"},{"line_number":138,"context_line":"    def process_response(request, response):"},{"line_number":139,"context_line":"        \"\"\"Add the CORS headers to the response if the request was CORS.\"\"\""},{"line_number":140,"context_line":"        if \u0027Origin\u0027 not in request.headers:"}],"source_content_type":"text/x-python","patch_set":9,"id":"baa201ad_f645f8b3","line":137,"in_reply_to":"baa201ad_765ca826","updated":"2014-09-29 05:40:41.000000000","message":"I agree with this reasoning, losing the @staticmethod.","commit_id":"dd057149e2b78c6323f26b5c7c671342084ca386"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"febd73d48abbb3a1eae9e220df95a721fb2936a2","unresolved":false,"context_lines":[{"line_number":38,"context_line":"Keystone you would add the following to keystone-paste.ini settings::"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"  [filter:cors]"},{"line_number":41,"context_line":"  paste.filter_factory \u003d oslo.middleware.cors:CORSMiddleware.factory"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"and then add cors to the start of all the pipeline settings."},{"line_number":44,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"baa201ad_b8c71663","line":41,"updated":"2014-10-07 18:59:05.000000000","message":"we should add CORS to https://github.com/openstack/oslo.middleware/blob/master/oslo/middleware/__init__.py\n\nthe designed usage of oslo.middleware is to have the middleware called using oslo.middleware:\u003cMiddleware\u003e in this case oslo.middleware:CORS","commit_id":"ec9d6880314bae26b1abc29bf3f91ed86de60cd1"},{"author":{"_account_id":12071,"name":"Richard Jones","email":"r1chardj0n3s@gmail.com","username":"richard"},"change_message_id":"2d6e6bc0fc0ed211ed5b91931e1b9307fb0400bf","unresolved":false,"context_lines":[{"line_number":38,"context_line":"Keystone you would add the following to keystone-paste.ini settings::"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"  [filter:cors]"},{"line_number":41,"context_line":"  paste.filter_factory \u003d oslo.middleware.cors:CORSMiddleware.factory"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"and then add cors to the start of all the pipeline settings."},{"line_number":44,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"baa201ad_30a6d6ae","line":41,"in_reply_to":"baa201ad_b8c71663","updated":"2014-10-08 03:45:47.000000000","message":"Fixed!","commit_id":"ec9d6880314bae26b1abc29bf3f91ed86de60cd1"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"febd73d48abbb3a1eae9e220df95a721fb2936a2","unresolved":false,"context_lines":[{"line_number":42,"context_line":""},{"line_number":43,"context_line":"and then add cors to the start of all the pipeline settings."},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"And then in keystone.conf settings::"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    [cors]"},{"line_number":48,"context_line":"    ## Allowed origins. Either a single wildcard (\"*\"), or a comma delimited"}],"source_content_type":"text/x-python","patch_set":11,"id":"baa201ad_78292ee5","line":45,"updated":"2014-10-07 18:59:05.000000000","message":"are these options actually needed for global CONF object or is it specific to just this object?\n\nif the former, we should remove the comments from this point on and let the help text explain use.\n\nif the latter, we should pass these options in through paste. ie\n\n   [filter:cors]\n   paste.filter_factory \u003d oslo.middleware:CORS.factory\n   allow_origins \u003d null\n   allow_method \u003d GET, POST\n   ...","commit_id":"ec9d6880314bae26b1abc29bf3f91ed86de60cd1"},{"author":{"_account_id":12071,"name":"Richard Jones","email":"r1chardj0n3s@gmail.com","username":"richard"},"change_message_id":"2d6e6bc0fc0ed211ed5b91931e1b9307fb0400bf","unresolved":false,"context_lines":[{"line_number":42,"context_line":""},{"line_number":43,"context_line":"and then add cors to the start of all the pipeline settings."},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"And then in keystone.conf settings::"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    [cors]"},{"line_number":48,"context_line":"    ## Allowed origins. Either a single wildcard (\"*\"), or a comma delimited"}],"source_content_type":"text/x-python","patch_set":11,"id":"baa201ad_904862b4","line":45,"in_reply_to":"baa201ad_78292ee5","updated":"2014-10-08 03:45:47.000000000","message":"That\u0027s a fair comment - no, these options aren\u0027t needed anywhere except in the middleware. I will shift the configuration into the paste file (an option I was unaware of until you brought it up!)","commit_id":"ec9d6880314bae26b1abc29bf3f91ed86de60cd1"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"febd73d48abbb3a1eae9e220df95a721fb2936a2","unresolved":false,"context_lines":[{"line_number":47,"context_line":"    [cors]"},{"line_number":48,"context_line":"    ## Allowed origins. Either a single wildcard (\"*\"), or a comma delimited"},{"line_number":49,"context_line":"    ## list of origins. Origins are specified as the triple {protocol, host,"},{"line_number":50,"context_line":"    ## port}. Origins don\u0027t support wildcards or partial matches."},{"line_number":51,"context_line":"    ## To completely disallow CORS, use \"null\" here, which is the default."},{"line_number":52,"context_line":"    # allow_origins \u003d http://example.com, http://other.example.com:8080"},{"line_number":53,"context_line":"    # allow_origins \u003d *"}],"source_content_type":"text/x-python","patch_set":11,"id":"baa201ad_d8be9aad","line":50,"updated":"2014-10-07 18:59:05.000000000","message":"why does it say it doesn\u0027t support wildcards or the first line says it is?","commit_id":"ec9d6880314bae26b1abc29bf3f91ed86de60cd1"},{"author":{"_account_id":12071,"name":"Richard Jones","email":"r1chardj0n3s@gmail.com","username":"richard"},"change_message_id":"2d6e6bc0fc0ed211ed5b91931e1b9307fb0400bf","unresolved":false,"context_lines":[{"line_number":47,"context_line":"    [cors]"},{"line_number":48,"context_line":"    ## Allowed origins. Either a single wildcard (\"*\"), or a comma delimited"},{"line_number":49,"context_line":"    ## list of origins. Origins are specified as the triple {protocol, host,"},{"line_number":50,"context_line":"    ## port}. Origins don\u0027t support wildcards or partial matches."},{"line_number":51,"context_line":"    ## To completely disallow CORS, use \"null\" here, which is the default."},{"line_number":52,"context_line":"    # allow_origins \u003d http://example.com, http://other.example.com:8080"},{"line_number":53,"context_line":"    # allow_origins \u003d *"}],"source_content_type":"text/x-python","patch_set":11,"id":"baa201ad_b0e006ce","line":50,"in_reply_to":"baa201ad_d8be9aad","updated":"2014-10-08 03:45:47.000000000","message":"It is difficult to word this so it makes sense. I\u0027ve attempted to clarify it.","commit_id":"ec9d6880314bae26b1abc29bf3f91ed86de60cd1"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"febd73d48abbb3a1eae9e220df95a721fb2936a2","unresolved":false,"context_lines":[{"line_number":113,"context_line":"CONF.register_opts(settings, group\u003d\u0027cors\u0027)"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"class CORSMiddleware(base.Middleware):"},{"line_number":117,"context_line":"    def process_request(self, request):"},{"line_number":118,"context_line":"        \"\"\"Optionally hijack OPTIONS pre-flight requests."},{"line_number":119,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"baa201ad_9893325a","line":116,"updated":"2014-10-07 18:59:05.000000000","message":"we dropped the Middleware suffix from other middleware because of redundancy... let\u0027s just call it CORS or Cors.","commit_id":"ec9d6880314bae26b1abc29bf3f91ed86de60cd1"},{"author":{"_account_id":12071,"name":"Richard Jones","email":"r1chardj0n3s@gmail.com","username":"richard"},"change_message_id":"2d6e6bc0fc0ed211ed5b91931e1b9307fb0400bf","unresolved":false,"context_lines":[{"line_number":113,"context_line":"CONF.register_opts(settings, group\u003d\u0027cors\u0027)"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"class CORSMiddleware(base.Middleware):"},{"line_number":117,"context_line":"    def process_request(self, request):"},{"line_number":118,"context_line":"        \"\"\"Optionally hijack OPTIONS pre-flight requests."},{"line_number":119,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"baa201ad_50a19a92","line":116,"in_reply_to":"baa201ad_9893325a","updated":"2014-10-08 03:45:47.000000000","message":"Fixed!","commit_id":"ec9d6880314bae26b1abc29bf3f91ed86de60cd1"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"febd73d48abbb3a1eae9e220df95a721fb2936a2","unresolved":false,"context_lines":[{"line_number":134,"context_line":""},{"line_number":135,"context_line":"        # Process the preflight response by just sending an empty \u0027200 OK\u0027"},{"line_number":136,"context_line":"        # Manually alter the response because we short-circuit __call__"},{"line_number":137,"context_line":"        LOG.debug(\u0027Hijacking OPTIONS\u0027)"},{"line_number":138,"context_line":"        return self.process_response(webob.Response())"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"    def process_response(self, response):"}],"source_content_type":"text/x-python","patch_set":11,"id":"baa201ad_933dd3c6","line":137,"updated":"2014-10-07 18:59:05.000000000","message":"this log isn\u0027t really helpful for debugging. seems like a it\u0027s useful for testing","commit_id":"ec9d6880314bae26b1abc29bf3f91ed86de60cd1"},{"author":{"_account_id":12071,"name":"Richard Jones","email":"r1chardj0n3s@gmail.com","username":"richard"},"change_message_id":"2d6e6bc0fc0ed211ed5b91931e1b9307fb0400bf","unresolved":false,"context_lines":[{"line_number":134,"context_line":""},{"line_number":135,"context_line":"        # Process the preflight response by just sending an empty \u0027200 OK\u0027"},{"line_number":136,"context_line":"        # Manually alter the response because we short-circuit __call__"},{"line_number":137,"context_line":"        LOG.debug(\u0027Hijacking OPTIONS\u0027)"},{"line_number":138,"context_line":"        return self.process_response(webob.Response())"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"    def process_response(self, response):"}],"source_content_type":"text/x-python","patch_set":11,"id":"baa201ad_7075be30","line":137,"in_reply_to":"baa201ad_933dd3c6","updated":"2014-10-08 03:45:47.000000000","message":"I disagree. Someone debugging why their OPTIONS code isn\u0027t being invoked would want to see this.","commit_id":"ec9d6880314bae26b1abc29bf3f91ed86de60cd1"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"4fc66b8c91d3096606d9f113aa8c8ec51b2a8e3e","unresolved":false,"context_lines":[{"line_number":38,"context_line":"Keystone you would add the following to keystone-paste.ini settings::"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    [filter:cors]"},{"line_number":41,"context_line":"    paste.filter_factory \u003d oslo.middleware.cors:CORSMiddleware.factory"},{"line_number":42,"context_line":"    ## Allowed origins. Either a single wildcard (\"*\"), or a comma delimited"},{"line_number":43,"context_line":"    ## list of origins. Origins are specified as the triple {protocol, host,"},{"line_number":44,"context_line":"    ## port}. Origins don\u0027t support partial matches, nor wildcard apart from"}],"source_content_type":"text/x-python","patch_set":14,"id":"baa201ad_00496730","line":41,"updated":"2014-10-08 20:06:22.000000000","message":"update example: \n\n   [filter:cors]\n   paste.filter_factory \u003d oslo.middleware:CORS.factory","commit_id":"693be503cc786db8f428f73e5ad4bff967d69bbe"},{"author":{"_account_id":12071,"name":"Richard Jones","email":"r1chardj0n3s@gmail.com","username":"richard"},"change_message_id":"644051c8ca7731d43d8fbef0064b8a371557517c","unresolved":false,"context_lines":[{"line_number":38,"context_line":"Keystone you would add the following to keystone-paste.ini settings::"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    [filter:cors]"},{"line_number":41,"context_line":"    paste.filter_factory \u003d oslo.middleware.cors:CORSMiddleware.factory"},{"line_number":42,"context_line":"    ## Allowed origins. Either a single wildcard (\"*\"), or a comma delimited"},{"line_number":43,"context_line":"    ## list of origins. Origins are specified as the triple {protocol, host,"},{"line_number":44,"context_line":"    ## port}. Origins don\u0027t support partial matches, nor wildcard apart from"}],"source_content_type":"text/x-python","patch_set":14,"id":"baa201ad_899abcc3","line":41,"in_reply_to":"baa201ad_00496730","updated":"2014-10-10 05:28:02.000000000","message":"Thanks, nice catch.","commit_id":"693be503cc786db8f428f73e5ad4bff967d69bbe"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"4fc66b8c91d3096606d9f113aa8c8ec51b2a8e3e","unresolved":false,"context_lines":[{"line_number":120,"context_line":""},{"line_number":121,"context_line":"        # Process the preflight response by just sending an empty \u0027200 OK\u0027"},{"line_number":122,"context_line":"        # Manually alter the response because we short-circuit __call__"},{"line_number":123,"context_line":"        LOG.debug(\u0027Hijacking OPTIONS\u0027)"},{"line_number":124,"context_line":"        return self.process_response(webob.Response())"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"    def process_response(self, response):"}],"source_content_type":"text/x-python","patch_set":14,"id":"baa201ad_a0dc1b47","line":123,"updated":"2014-10-08 20:06:22.000000000","message":"i disagree with your disagree.lol\n\ntbh, this won\u0027t help someone debugging why their options code isn\u0027t being invoked... this just says \"i made it this far\" and it does this for every single request.\n\nmy main concern is we have a lot of complaints on flooding logs... i can see this being a scenario. i\u0027d much prefer if we logged an exception or something that gave some info beyond \u0027you are here\u0027","commit_id":"693be503cc786db8f428f73e5ad4bff967d69bbe"},{"author":{"_account_id":12071,"name":"Richard Jones","email":"r1chardj0n3s@gmail.com","username":"richard"},"change_message_id":"644051c8ca7731d43d8fbef0064b8a371557517c","unresolved":false,"context_lines":[{"line_number":120,"context_line":""},{"line_number":121,"context_line":"        # Process the preflight response by just sending an empty \u0027200 OK\u0027"},{"line_number":122,"context_line":"        # Manually alter the response because we short-circuit __call__"},{"line_number":123,"context_line":"        LOG.debug(\u0027Hijacking OPTIONS\u0027)"},{"line_number":124,"context_line":"        return self.process_response(webob.Response())"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"    def process_response(self, response):"}],"source_content_type":"text/x-python","patch_set":14,"id":"baa201ad_e9a988e0","line":123,"in_reply_to":"baa201ad_a0dc1b47","updated":"2014-10-10 05:28:02.000000000","message":"Flooding is why I made it a debug...","commit_id":"693be503cc786db8f428f73e5ad4bff967d69bbe"}],"requirements.txt":[{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"db0b7bb8fb68eb87ca61f307624f7b2f0b0c7b15","unresolved":false,"context_lines":[{"line_number":7,"context_line":"oslo.i18n\u003e\u003d1.0.0  # Apache-2.0"},{"line_number":8,"context_line":"six\u003e\u003d1.7.0"},{"line_number":9,"context_line":"WebOb\u003e\u003d1.2.3"},{"line_number":10,"context_line":"mox\u003e\u003d0.5.3"}],"source_content_type":"text/plain","patch_set":9,"id":"baa201ad_f647b849","line":10,"updated":"2014-09-29 03:39:44.000000000","message":"Oh. OpenStack has been (AFAIK) standarding on mock. Is there some reason you\u0027re using mox instead?","commit_id":"dd057149e2b78c6323f26b5c7c671342084ca386"}],"tests/test_cors.py":[{"author":{"_account_id":7069,"name":"Joshua Hesketh","email":"josh@nitrotech.org","username":"jhesketh"},"change_message_id":"2982d22f0d08e6d061c3104aebd4e0390fee199b","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2011-2013 OpenStack Foundation."},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa98f980_1d3526db","line":1,"updated":"2014-09-17 01:56:04.000000000","message":"ditto","commit_id":"3a9ec278cc146f4a591e053b6ad82ebfe8af2bb3"},{"author":{"_account_id":12071,"name":"Richard Jones","email":"r1chardj0n3s@gmail.com","username":"richard"},"change_message_id":"e45c626a2fbe4316186caf82b867fdf5435b2cd0","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2011-2013 OpenStack Foundation."},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa98f980_ddf63ef9","line":1,"in_reply_to":"fa98f980_1d3526db","updated":"2014-09-17 02:08:46.000000000","message":"Done","commit_id":"3a9ec278cc146f4a591e053b6ad82ebfe8af2bb3"}]}
