mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2024-12-24 04:46:48 +01:00
29 lines
578 B
C++
29 lines
578 B
C++
#ifndef CSRF_TOKEN_H
|
|
#define CSRF_TOKEN_H
|
|
|
|
#include "middleware.h"
|
|
|
|
#include "core/containers/vector.h"
|
|
#include "core/string.h"
|
|
|
|
class Request;
|
|
|
|
class CSRFTokenWebServerMiddleware : public WebServerMiddleware {
|
|
RCPP_OBJECT(CSRFTokenWebServerMiddleware, WebServerMiddleware);
|
|
|
|
public:
|
|
//returnring true means handled, false means continue
|
|
bool on_before_handle_request_main(Request *request);
|
|
|
|
bool shold_ignore(Request *request);
|
|
|
|
virtual String create_token();
|
|
|
|
CSRFTokenWebServerMiddleware();
|
|
~CSRFTokenWebServerMiddleware();
|
|
|
|
Vector<String> ignored_urls;
|
|
};
|
|
|
|
#endif
|