Allow optional cross-origin resource sharing of served assets in middlew...

...are