Added HTTPS and CORS support