|
XRootD
|
#include <XrdHttpCorsHandler.hh>
Inheritance diagram for XrdHttpCorsHandler:
Collaboration diagram for XrdHttpCorsHandler:Public Member Functions | |
| XrdHttpCorsHandler ()=default | |
| void | addAllowedOrigin (const std::string &origin) override |
| int | Configure (const char *configFN, XrdSysError *errP) override |
| std::optional< std::string > | getCORSAllowOriginHeader (const std::string &origin) override |
Basic CORS plugin implementation
Definition at line 31 of file XrdHttpCorsHandler.hh.
|
default |
|
overridevirtual |
Add trusted origins to the CORS plugin
| origin | the trusted origin to add |
Implements XrdHttpCors.
Definition at line 64 of file XrdHttpCorsHandler.cc.
References XrdOucUtils::trim().
Referenced by Configure().
Here is the call graph for this function:
Here is the caller graph for this function:
|
overridevirtual |
Configure the CORS handler
| configFN | the configuration file name |
| errP | the error pointer allowing to log potential errors |
Implements XrdHttpCors.
Definition at line 40 of file XrdHttpCorsHandler.cc.
References addAllowedOrigin(), XrdOucGatherConf::Gather(), XrdOucGatherConf::GetLine(), XrdOucGatherConf::GetToken(), and XrdOucGatherConf::only_body.
Here is the call graph for this function:
|
overridevirtual |
Returns the fully formed Access-Control-Allow-Origin header. If the origin passed in parameter matches one of the previously added origins, it will return "Access-Control-Allow-Origin: matchedOrigin". If the origin passed in parameter does not match any of the previously added origins, then std::nullopt will be returned
| origin |
Implements XrdHttpCors.
Definition at line 55 of file XrdHttpCorsHandler.cc.