-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CVAT CORS issue when uploading large files #6201
Comments
@klakhov could you look at the issue? |
@klakhov, @bsekachev , Any interesting updates regarding this? |
Appreciate some help here |
@pyhsudars please provide exact steps to reproduce. If you are not using |
Installed CVAT in aws ec2 instance by running below steps sudo apt update echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null VERSION_STRING = 5:23.0.3-1 version=1.8.14 sudo chmod +x nuctl-${version}-linux-amd64 git clone https://github.com/opencv/cvat cd cvat git reset --hard 8a14ce8 sudo docker exec -it cvat_server bash -ic 'python3 ~/manage.py createsuperuser' sleep 10 cd cvat echo "Healthcheck" docker compose -f docker-compose.yml -f components/serverless/docker-compose.serverless.yml up -d --build #create and deploy a nuctl project ############################################################## i'm accessing cvat using the url "https://www.xx.com" which directs traffic to an ALB which inturn forwards traffic to ec2 instance private ip. |
Your ALB (or reverse proxy) must set X-Forwarded-Proto to https. |
I get the exact same error |
Im hosting cvat in AWS ec2 instance. i'm using my custom domainname to hit the AWS application load balancer which eventually directs to ec2 instance where cvat containers are running.
I'm running the containers as follows
docker compose -f docker-compose.yml -f components/serverless/docker-compose.serverless.yml up -d --build
Note:- (I'm not using docker-compose.https.yml)
The problem i'm facing is that for smaller images(size < 1 MB), the annotation tasks are getting created and we could see that the api call happening is "https".
But, when i try to create tasks with bigger images (Size >1 MB) for annotation, those api calls are using "http" protocol and is not working fine. I'm getting cors error as follows.
"Could not create the task. Error: tus: failed to upload chunk at offset 0, caused by [object ProgressEvent], originated from request (method: PATCH,..........................."
When inspected using google chrome, we could see the issue is with "upload.js" file residing in "tus-client" folder.This is the file used to implement chunking option for big files .
Please let us know how we can resolve the issue
Error message displayed in console:
Mixed Content: The page at 'https://www.xx.com/tasks/create' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://www.xx.com/api/tasks/72/data/7c08e3a2-962f-44cc-a63d-31955475d81a'. This request has been blocked; the content must be served over HTTPS.
cvat-app.tsx:354 Error: tus: failed to upload chunk at offset 0, caused by [object ProgressEvent], originated from request (method: PATCH, url: http://www.xx.com/api/tasks/72/data/7c08e3a2-962f-44cc-a63d-31955475d81a, response code: n/a, response text: n/a, request id: n/a).
The text was updated successfully, but these errors were encountered: