Webhooks & Delete Api Cors issue

Does Orthanc support WebSockets or Webhooks?

Also

Additionally, I am encountering a CORS issue when trying to access the DELETE API in a production environment. I have already defined DELETE along with other methods such as GET, POST, and OPTIONS in Nginx. How can I resolve the CORS origin issue for the DELETE API endpoint in production? Since I am purely using frontend and have not set up a backend, I want to handle the CORS issue directly in my frontend environment.

Following is my Ngnix Config File

worker_processes  1;

events {
    worker_connections  1024;
}

http {
    include       mime.types;
    default_type  application/octet-stream;
    sendfile        on;
    keepalive_timeout  65;

    server {
        listen  8050;

        location /orthanc/ {
            proxy_pass http://localhost:8042;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            rewrite /orthanc(.*) $1 break;

            # Allow CORS
            add_header 'Access-Control-Allow-Origin' '*';
            add_header 'Access-Control-Allow-Credentials' 'true';
            add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS, DELETE';
            add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type';

            # Preflight CORS check
            if ($request_method = OPTIONS ) {
                add_header 'Access-Control-Allow-Origin' '*';
                add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS,DELETE';
                add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type';
                return 204;
            }
           
        }
    }
}


Hello

You can implement webhooks in Lua. Here is a sample.

For the CORS issue, I have no idea but the topic has already been discussed many times on this forum.

Best regards,

Alain.

Hello,

Instructions to enable CORS using nginx are available in the Orthanc Book.

Regards,
Sébastien-