Project

General

Profile

Technical #6617

upgrade flask-cors version

Added by Pascal Cadotte-Michaud over 1 year ago. Updated over 1 year ago.

Status:
Resolved
Priority:
Normal
Category:
Packaging
Target version:
Security issue:
No
Resolution:
Fixed
Read documentation?:
Yes

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 over 1 year 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 over 1 year ago

  • Status changed from Resolved to Code review

xivo-doc

br: 6617-flask-cors-upgrade

#3 Updated by Pascal Cadotte-Michaud over 1 year ago

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

Also available in: Atom PDF