related to: https://github.com/clarity-h2020/data-package/issues/50
Just a reminder: in order for our screenshot function to work, the WMS server must implement Access-Control-Allow-Origin header. Usually this is solved by adding the CORS headers which are:
I am not sure how exactly do it but it should be something similar to this:
var allowCrossDomain = function(req, res, next) {
res.header("Access-Control-Allow-Origin", "*"); // allow requests from any other server
res.header('Access-Control-Allow-Methods', 'GET,PUT,POST,DELETE'); // allow these verbs
res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept, Cache-Control");
app.use(allowCrossDomain); // plumbing it in as middleware
With the * you are allowing any other server, but you can state specific ones (services.clarity-h2020.eu:8080 in our case)
related to: https://github.com/clarity-h2020/data-package/issues/50 Just a reminder: in order for our screenshot function to work, the WMS server must implement Access-Control-Allow-Origin header. Usually this is solved by adding the CORS headers which are:
I am not sure how exactly do it but it should be something similar to this:
With the * you are allowing any other server, but you can state specific ones (services.clarity-h2020.eu:8080 in our case)