fixing secure layer because of CORS