Orbit Framework 2.0.0
A high-performance asynchronous C++20 HTTP server framework.
Loading...
Searching...
No Matches
Cors.hpp File Reference
#include <orbit/legacy_namespaces.hpp>
#include <orbit/routing/Router.hpp>
#include <string>
#include <vector>
Include dependency graph for Cors.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  orbit::middleware::CorsOptions
 Options for configuring CORS (Cross-Origin Resource Sharing). More...
 

Namespaces

namespace  orbit
 
namespace  orbit::middleware
 

Functions

routing::Middleware orbit::middleware::cors (CorsOptions options=CorsOptions{})
 Returns a middleware that handles CORS.
 
routing::Middleware orbit::middleware::require_origin (std::vector< std::string > allowed_origins)
 Rejects browser requests from origins that are not listed.