CORS implementation fixes for chrome. firefox and safari browser

Signed-off-by: Michal Bínovský <michalbinovsky@outlook.com>