[web] implement cross origin resource sharing (CORS) (closes #2491768)
Partial implementation that is enough to get started but leaves out
some of the advanced features like caching and non-simple methods
and headers.
Experiment with the search bar. Try queries like "card sometextualcontent" or"card wikiid index" or "345".