aws-samples / annotate-medical-images-in-dicom-server-and-build-ml-models-on-amazon-sagemaker

MIT No Attribution
19 stars 15 forks source link

CORS issue when launching the labelling taks #7

Open saiplent opened 3 years ago

saiplent commented 3 years ago

Hi, Not sure I can post this as an issue, pretty new to GitHub... sorry if I should not have.

I have an up and running Orthanc on AWS so I do not use the stack to create it. Mine runs on an EC2 instance, ubuntu, behing an elastic load balancer, using S3 and Aurora PostgreSQL serverless. It works. I use the CF template here to deploy the lambda function, roles, bucket...

When I start the labelling tool, I have this error: Access to XMLHttpRequest at 'http://my-elb-dns-name-goes-here/instances/32de62c1-381ac837-e843f0ae-770d263f-b925bb4c/file' from origin 'https://s3.amazonaws.com' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.

I have tried many things, like CORS policy on the Orthanc used S3 bucket, the labelling S3 bucket. I have installed a NGNIX reverse proxy between the ELB and Orthanc to configure this: https://book.orthanc-server.com/faq/nginx.html#nginx

So I am not sure why I get this error. Is there something specific that I might have missed, that is configured in the template provided here for Orthanc.

Thanks Julien