2022-06-26 19:43:31 +02:00
|
|
|
#ifndef WEB_SERVRER_MIDDLEWARE_H
|
|
|
|
#define WEB_SERVRER_MIDDLEWARE_H
|
2022-06-25 01:55:54 +02:00
|
|
|
|
2022-06-26 19:43:31 +02:00
|
|
|
#include "core/ustring.h"
|
2022-06-25 01:55:54 +02:00
|
|
|
|
2022-06-27 13:51:55 +02:00
|
|
|
#include "core/resource.h"
|
2022-06-25 01:55:54 +02:00
|
|
|
|
2022-06-26 19:43:31 +02:00
|
|
|
class WebServerRequest;
|
2022-06-25 01:55:54 +02:00
|
|
|
|
2022-06-27 13:51:55 +02:00
|
|
|
class WebServerMiddleware : public Resource {
|
|
|
|
GDCLASS(WebServerMiddleware, Resource);
|
2022-06-25 01:55:54 +02:00
|
|
|
|
|
|
|
public:
|
|
|
|
//returnring true means handled, false, means continue
|
2022-06-26 19:43:31 +02:00
|
|
|
bool on_before_handle_request_main(Ref<WebServerRequest> request);
|
|
|
|
|
|
|
|
virtual bool _on_before_handle_request_main(Ref<WebServerRequest> request);
|
2022-06-25 01:55:54 +02:00
|
|
|
|
2022-06-26 15:00:25 +02:00
|
|
|
WebServerMiddleware();
|
|
|
|
~WebServerMiddleware();
|
2022-06-26 19:43:31 +02:00
|
|
|
|
|
|
|
protected:
|
|
|
|
static void _bind_methods();
|
2022-06-25 01:55:54 +02:00
|
|
|
};
|
|
|
|
|
2022-06-26 15:00:25 +02:00
|
|
|
#endif
|