Crow  1.1
A C++ microframework for the web
crow::CORSRules Struct Reference

Used for tuning CORS policies. More...

#include <cors.h>

Public Member Functions

CORSRulesorigin (const std::string &origin)
 Set Access-Control-Allow-Origin. Default is "*".
 
CORSRulesmethods (crow::HTTPMethod method)
 Set Access-Control-Allow-Methods. Default is "*".
 
template<typename... Methods>
CORSRulesmethods (crow::HTTPMethod method, Methods... method_list)
 Set Access-Control-Allow-Methods. Default is "*".
 
CORSRulesheaders (const std::string &header)
 Set Access-Control-Allow-Headers. Default is "*".
 
template<typename... Headers>
CORSRulesheaders (const std::string &header, Headers... header_list)
 Set Access-Control-Allow-Headers. Default is "*".
 
CORSRulesmax_age (int max_age)
 Set Access-Control-Max-Age. Default is none.
 
CORSRulesallow_credentials ()
 Enable Access-Control-Allow-Credentials.
 
void ignore ()
 Ignore CORS and don't send any headers.
 
CORSRulesprefix (const std::string &prefix)
 Handle CORS on specific prefix path.
 
CORSRulesblueprint (const Blueprint &bp)
 Handle CORS for specific blueprint.
 
CORSRulesglobal ()
 Global CORS policy.
 

Friends

struct crow::CORSHandler
 

Detailed Description

Used for tuning CORS policies.


The documentation for this struct was generated from the following file: