Technical #6617

upgrade flask-cors version

Added by Pascal Cadotte-Michaud 3 months ago. Updated 3 months ago.

Status:Resolved
Priority:Normal
Assignee:Pascal Cadotte-Michaud
Category:Packaging
Target version:17.05
Security issue:No Read documentation?:Yes
Resolution:Fixed

Description

we are using flask-cors 1.10.3 which is a few years old. upgrade to a more recent version

History

#1 Updated by Pascal Cadotte-Michaud 3 months ago

The old version of flask-cors supported setting `allowed_headers` as a string of coma separated headers.
This configuration does not work anymore.

Our configuration files have all been updated but some users may have custom configuration file with the old syntax.

The following command will show the administrator which files need to be updated:

for f in $(find /etc/*/conf.d -name '*.yml'); do grep -H allow_headers $f; done

The following change should be made:

old config:

rest_api:
  cors:
    allow_headers: Content-Type, X-Auth-Token

new config:

rest_api:
  cors:
    allow_headers: ["Content-Type", "X-Auth-Token"]

the allow_headers value is now a yaml list

#2 Updated by Pascal Cadotte-Michaud 3 months ago

  • Status changed from Resolved to Code review

xivo-doc

br: 6617-flask-cors-upgrade

#3 Updated by Pascal Cadotte-Michaud 3 months ago

  • Resolution set to Fixed
  • Status changed from Code review to Resolved

Also available in: Atom PDF