inbuilds/cors_handler library

Functions

corsHandler({String allowOrigin = '*', String allowMethods = 'GET, POST, PUT, DELETE, OPTIONS', String allowHeaders = 'Origin, Content-Type, Accept, Authorization', bool allowCredentials = false}) Future<Response> Function(Request request, FutureOr<Response> nextHandler())
Creates a reusable CORS (Cross-Origin Resource Sharing) handler middleware for the Sirius backend framework.