Based on the information you've provided, it seems like you're encountering a CORS (Cross-Origin Resource Sharing) issue. This issue arises when a web application makes a request to a different domain than the one it originated from. In your case, it seems like your Nginx server is set up to proxy requests to your Orthanc server, but the CORS policy is not allowing the request to be made.
To resolve this issue, you can add the following lines to your Nginx configuration file:
location /orthanc/ {
proxy_pass http://localhost:8042/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Credentials' 'true';
add_header 'Access-Control-Allow-Headers' 'Authorization,Content-Type,Accept,Origin,User-Agent,DNT,Cache-Control,X-Mx-ReqToken,Keep-Alive,X-Requested-With,If-Modified-Since';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS, PUT, DELETE';
}
This configuration will allow your Nginx server to accept requests from any origin, and it will include the necessary headers in the response to enable CORS.
After making these changes, remember to restart your Nginx server for the changes to take effect.
If you're still encountering issues, you might want to check the Orthanc server logs for any error messages that could provide more insight into the problem.