         // Get methods
         do {
             let methodArray: [String] = try cors.get("allowedMethods")
-            self.allowedMethods = methodArray.joined(separator: ", ").uppercased()
+            allowedMethods = methodArray.joined(separator: ", ").uppercased()
         } catch {
             throw CORSConfigurationError.missingRequiredConfigurationKey("allowedMethods")
         }

        // Get allowed headers
        do {
            let headersArray: [String] = try cors.get("allowedHeaders")
            self.allowedHeaders = headersArray.joined(separator: ", ")
        } catch {
            throw CORSConfigurationError.missingRequiredConfigurationKey("allowedHeaders")
        }

        // Allow credentials
        let allowCredentials: Bool? = try cors.get("allowCredentials")
        self.allowCredentials = allowCredentials ?? false

        // Cache expiration
        self.cacheExpiration = try cors.get("cacheExpiration") ?? 600

        if let exposedHeaders = cors["exposedHeaders"] {
            switch exposedHeaders.wrapped {

        // Allowed origin
        do {
            let originString: String = try cors.get("allowedOrigin")
            switch originString.lowercased() {
            case "all", "*": allowedOrigin = .all
            case "none", "": allowedOrigin = .none
            case "origin": allowedOrigin = .originBased
            default: allowedOrigin = .custom(originString)
            }
        } catch {
            throw CORSConfigurationError.missingRequiredConfigurationKey("allowedOrigin")
