RedirectConfiguration
public struct RedirectConfiguration
Specifies redirect processing settings.
-
Redirects are not followed.
Declaration
Swift
public static let disallow: HTTPClient.Configuration.RedirectConfiguration
-
Redirects are followed with a specified limit.
Warning
Cycle detection will keep all visited URLs in memory which means a malicious server could use this as a denial-of-service vector.
Declaration
Swift
public static func follow(max: Int, allowCycles: Bool) -> RedirectConfiguration
Parameters
max
The maximum number of allowed redirects.
allowCycles
Whether cycles are allowed.