public struct Mapping
Mapping is a declaration of a single mapping. All urls that
match the description of the
sourceLocation will be changed
according to the description in the
nil values are ignored in this case.
Mapping will update all http requests to https requests.
Mapping(name: "https-ify", sourceLocation: MappingLocation(scheme: "http"), destinationLocation: MappingLocation(scheme: "https"))
This mapping will redirect all requests to localhost.
Mapping(name: "map local", sourceLocation: MappingLocation(), destinationLocation: MappingLocation(host: "localhost")
Initializes a new
The name of the
Mapping. This is used to uniquely identify this mapping.
This defines all urls this
Mappingshould apply to.
This defines the changes for the url.