Added support for setting allowed origins