Instance Methodvapor 4.114.1Vapor
respond(to:chainingTo:)
CORSMiddleware.swift:126func respond(to request: Request, chainingTo next: Responder) -> EventLoopFuture<Response>
func respond(to request: Request, chainingTo next: Responder) -> EventLoopFuture<Response>
s5Vapor14CORSMiddlewareC7respond2to10chainingTo7NIOCore15EventLoopFutureCyAA8ResponseCGAA7RequestC_AA9Responder_ptF
What are these?6JTEK
import Vapor
Vapor is a framework for building server applications, APIs and websites in Swift. It provides a safe, performant and scalable foundation for building large complex backends.
final class CORSMiddleware
Middleware that adds support for CORS settings in request responses. For configuration of this middleware please use the CORSMiddleware.Configuration
object.
final class Request
Represents an HTTP request in an application.
protocol Responder : Sendable
final class EventLoopFuture<Value>
Holder for a result that will be provided later.
final class Response
An HTTP response from a server back to the client.
init(configuration: Configuration = .default())
Creates a CORS middleware with the specified configuration.
let configuration: Configuration
Configuration used for populating headers in response for CORS requests.
enum AllowOriginSetting
Option for the allow origin header in responses for CORS requests.
struct Configuration
Configuration used for populating headers in response for CORS requests.