I'm currently using socket.io and express js. My goal is to configure access control allow origin for the socket connection.
One method I tried involved setting the 'origins' property during the initialization of the socket.
var io = require('socket.io')(http, {origins: 'http://www.example.com'})
https://i.sstatic.net/XDFC9.png The image above shows that the access control allow origin has been set to *. However, my intention is to set it to example.com (also noting that the request method is GET).
https://i.sstatic.net/buLCT.png Conversely, in this second image, the access control allow origin header is configured (with the request method being POST).
I would greatly appreciate help on how to include the access control allow origin header specifically when the request method is GET.