Browse Source

api: Do not guess based on name extension

Same issue as [0].

If a name ends in .json for example kube.json,
the API fails to process the request.

Create CT with name kube.json and try to do
openstack coe cluster template show kube.json

story: 1643995
task: 39862

[0] I789ecfeac9b64a9c4105a20619f7bf5dfc133189

Change-Id: I0db38880de0727aeed0290fd7f36002f17c0b8f2
Signed-off-by: Spyros Trigazis <strigazi@gmail.com>
(cherry picked from commit 07ba257d768eed0d373ea1f7f2cb11509d88d276)
changes/76/731176/1
Spyros Trigazis 1 month ago
parent
commit
5dc483e68c
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      magnum/api/app.py

+ 1
- 0
magnum/api/app.py View File

@@ -43,6 +43,7 @@ def setup_app(config=None):
app_conf.pop('root'),
logging=getattr(config, 'logging', {}),
wrap_app=middleware.ParsableErrorMiddleware,
guess_content_type_from_ext=False,
**app_conf
)



Loading…
Cancel
Save