CORS origins setup does not work

@vinothkannans can you change it so we auto strip trailing slash here?