Stijn Habekotté
07/13/2022, 2:27 PMReason: header 'authorization' is not allowed according to header 'Access-Control-Allow-Headers' from CORS preflight response
.
I have had contact with Vincil and to us it seems like it could be a bug. But maybe we're mistaken, is there a simple way to fix this error?
Things worthy of note:
• We're both running Angular 12
• We're both using the local version of GoodData.CN both at version 1.7.2
Best regards,
StijnJan Soubusta
07/13/2022, 3:24 PMPeter Plochan
07/14/2022, 7:00 AMJan Soubusta
07/14/2022, 10:35 AMVincil Bishop
07/14/2022, 1:11 PMVincil Bishop
07/14/2022, 1:11 PMPeter Plochan
07/14/2022, 1:34 PMVincil Bishop
07/14/2022, 1:34 PMVincil Bishop
07/14/2022, 1:35 PMVincil Bishop
07/14/2022, 1:35 PMVincil Bishop
07/14/2022, 1:35 PMVincil Bishop
07/14/2022, 1:36 PMJan Soubusta
07/14/2022, 2:06 PMJan Soubusta
07/14/2022, 2:07 PMStijn Habekotté
07/18/2022, 8:58 AMReason: header 'authorization' is not allowed according to header 'Access-Control-Allow-Headers' from CORS preflight response
Error.Jan Soubusta
07/18/2022, 9:53 AMPeter Plochan
07/18/2022, 11:51 AM2.1
.Stijn Habekotté
07/18/2022, 1:34 PMStijn Habekotté
07/18/2022, 1:49 PMRobert Moucha
07/18/2022, 3:41 PMStijn Habekotté
07/19/2022, 2:27 PMRobert Moucha
07/19/2022, 3:11 PMdocker run -it --rm --name temporary -d --entrypoint bash gooddata/gooddata-cn-ce:2.0.0
docker cp temporary:/etc/nginx/conf.d/cloudnative.conf.tmpl .
docker stop temporary
Now you can find a file cloudnative.conf.tmpl
in the current directory. Open it in some
text editor and modify lines 33 and 34:
* add PATCH
method to $CORS_METHODS
variable:
set $CORS_METHODS '*PATCH,* GET, POST, PUT, DELETE, OPTIONS';
* add Authorization
header to `$CORS_HEADERS`:
set $CORS_HEADERS '*Authorization,* Accept, Accept-Language, Authentication-Token, Cache-Control, ... etc, keep the rest of the line unchanged
Save the file and try starting a new GoodData.CN CE container with overridden nginx template:
docker run -it --rm -p 3000:3000 -v $PWD/cloudnative.conf.tmpl:/etc/nginx/conf.d/cloudnative.conf.tmpl ...other docker opts... gooddata/gooddata-cn-ce:2.0.0
Until the fix is published with the new version, you'd need to pass -v $PWD/cloudnative.conf.tmpl:/etc/nginx/conf.d/cloudnative.conf.tmpl
when starting a new container.Robert Moucha
07/19/2022, 3:12 PM