#include <XrdHttpCors.hh>
Base class for CORS plugin implementation
Definition at line 38 of file XrdHttpCors.hh.
◆ addAllowedOrigin()
| virtual void XrdHttpCors::addAllowedOrigin |
( |
const std::string & | origin | ) |
|
|
pure virtual |
Add trusted origins to the CORS plugin
- Parameters
-
| origin | the trusted origin to add |
Implemented in XrdHttpCorsHandler.
◆ Configure()
| virtual int XrdHttpCors::Configure |
( |
const char * | configFN, |
|
|
XrdSysError * | errP ) |
|
pure virtual |
Configure the CORS plugin
- Parameters
-
| configFN | the server configuration file path |
| errP | the pointer to the error object |
- Returns
- 0 if the configuration is successful, 1 otherwise
Implemented in XrdHttpCorsHandler.
◆ getCORSAllowOriginHeader()
| virtual std::optional< std::string > XrdHttpCors::getCORSAllowOriginHeader |
( |
const std::string & | origin | ) |
|
|
pure virtual |
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
- Parameters
-
- Returns
- either the fully formed Access-Control-Allow-Origin header or nullopt if the origin does not match any added origin
Implemented in XrdHttpCorsHandler.
The documentation for this class was generated from the following file: