allegroai / clearml-server

ClearML - Auto-Magical CI/CD to streamline your AI workload. Experiment Management, Data Management, Pipeline, Orchestration, Scheduling & Serving in one MLOps/LLMOps solution
https://clear.ml/docs
Other
381 stars 131 forks source link

Cors Configuration when trying to upload an Image #199

Closed abfshaal closed 1 year ago

abfshaal commented 1 year ago

Hello!

I am trying to fix an issue I am facing with CORS when I upload a file to clearml reports.

I did read in the documentation that the /opt/clearml/config/apiserver.conf should be created and contain the

cors {
   origins: "*"

   # Not supported when origins is "*"
   supports_credentials: true
}

However, I did add the file, and restarted the clearml deployment, I still do get the same error.

The error log is as follows Access to XMLHttpRequest at 'http://SERVER_NAME:8081/' from origin 'http://SERVER_NAME:8080' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: The value of the 'Access-Control-Allow-Credentials' header in the response is '' which must be 'true' when the request's credentials mode is 'include'. The credentials mode of requests initiated by the XMLHttpRequest is controlled by the withCredentials attribute.

Is there something else that I am missing?

Many thanks for your help and for clearml!

shyallegro commented 1 year ago

Hi @abfshaal isn't this issue a duplicate of https://github.com/allegroai/clearml/issues/1020 ? on which version are you experiencing this issue on?

abfshaal commented 1 year ago

Hi @shyallegro , you are right! I had an older version of clearml and updating it with the latest docker pull fixes it, Many thanks !