WoodWing / elvis-image-recognition

Elvis integration with AI based image recognition services from AWS, Google and Clarifai
MIT License
11 stars 10 forks source link

Allow overriding Cross-Origin Resource Sharing header #6

Closed siebrand closed 6 years ago

siebrand commented 6 years ago

This makes it possible to use a different URL for connecting to the API and still allowing connections to the image recognition server from the pro client.

Ideally I'd have made this configurable, but I couldn't find a way to do that. res.header 'Access-Control-Allow-Origin' doesn't allow setting multiple domains in it.

This fixes https://github.com/WoodWing/elvis-image-recognition/issues/5

siebrand commented 6 years ago

After some off-GitHub discussion, I think we agreed that a simple boolean setting that will change the CORS header to * should suffice. I'll re-do the patch.