archiver-appliance / epicsarchiverap

This is an implementation of an archiver for EPICS control systems that aims to archive millions of PVs.
Other
38 stars 37 forks source link

Access-Control-Allow-Origin not set in response. #185

Closed jembishop closed 5 months ago

jembishop commented 8 months ago

Hi I'm using version 1.1 of the archiver appliance (I am finding this on an older version too). I am developing a web frontend, and I wanted to utilize some data using the epics archiver appliance, and I am encountering a problem. Even when the Origin header is set it looks like the Access-Control-Allow-Origin header is not set to "*". It looks like from reading in the code that these headers should be set so I'm a bit confused what is going on. I wanted to know if there is an extra config flag I need to enable this that I am missing? If not maybe this solution would fix https://stackoverflow.com/questions/12383109/access-control-allow-origin-in-tomcat.

To replicate, one can simply try fetch("http://<host_of_archiver_appliance>:17665/mgmt/bpl/getAllPVs") in the js console in a different webpage to the archiver appliance.