drogon
C++14/17-based HTTP application framework
Loading...
Searching...
No Matches
drogon::LocalHostFilter Class Reference

A filter that prohibit access from other hosts. More...

#include <drogon/LocalHostFilter.h>

Inheritance diagram for drogon::LocalHostFilter:
Collaboration diagram for drogon::LocalHostFilter:

Public Member Functions

void doFilter (const HttpRequestPtr &req, FilterCallback &&fcb, FilterChainCallback &&fccb) override
 This virtual function should be overridden in subclasses.
Public Member Functions inherited from drogon::DrObject< LocalHostFilter >
const std::string & className () const override
 Get the class name.
bool isClass (const std::string &class_name) const override
 Return true if the class name is 'class_name'.

Additional Inherited Members

Static Public Member Functions inherited from drogon::DrObject< LocalHostFilter >
static const std::string & classTypeName ()
Static Public Attributes inherited from drogon::HttpFilter< LocalHostFilter >
static constexpr bool isAutoCreation

Detailed Description

A filter that prohibit access from other hosts.

Member Function Documentation

◆ doFilter()

void drogon::LocalHostFilter::doFilter ( const HttpRequestPtr & req,
FilterCallback && fcb,
FilterChainCallback && fccb )
overridevirtual

This virtual function should be overridden in subclasses.

This method is an asynchronous interface, user should return the result via 'FilterCallback' or 'FilterChainCallback'.

Parameters
reqis the request object processed by the filter
fcbif this is called, the response object is send to the client by the callback, and doFilter methods of next filters and the handler registered on the path are not called anymore.
fccbif this callback is called, the next filter's doFilter method or the handler registered on the path is called.

Implements drogon::HttpFilterBase.


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