- added to Request: is_htmx_request (bool) - true if the request is made by htmx library (ajax)
- commented out using mount_page_arg_is "subject" and "info" from fun_cat.html and fun_run.html - they will be removed soon - some improvements in fun_reply.html, fun_showthreads.html and fun_thread.html (scrolling)
This commit is contained in:
@@ -940,6 +940,7 @@ void App::ReadRequest()
|
||||
|
||||
CheckIE();
|
||||
CheckKonqueror();
|
||||
CheckHtmx();
|
||||
|
||||
if( cur.request->using_ssl )
|
||||
log << log3 << "App: connection secure through SSL" << logend;
|
||||
@@ -1125,6 +1126,15 @@ void App::CheckSSL()
|
||||
}
|
||||
|
||||
|
||||
|
||||
void App::CheckHtmx()
|
||||
{
|
||||
// fastcgi will change the header to hx_request
|
||||
cur.request->is_htmx_request = (cur.request->headers_in.has_key(L"HX-Request") || cur.request->headers_in.has_key(L"hx_request"));
|
||||
}
|
||||
|
||||
|
||||
|
||||
void App::SetSubdomain()
|
||||
{
|
||||
CreateSubdomain(config.base_url.c_str(), cur.request->env_http_host.c_str(), cur.request->subdomain);
|
||||
@@ -1801,7 +1811,7 @@ size_t output_size = 0;
|
||||
source = &json_out_stream.Str(); // json_out_stream was prepared by CreateJSONAnswer()
|
||||
}
|
||||
else
|
||||
if( cur.request->headers_in.has_key(L"HX-Request") || cur.request->headers_in.has_key(L"hx_request") ) // fastcgi will change the header to hx_request
|
||||
if( cur.request->is_htmx_request )
|
||||
{
|
||||
source = CreateFrameAnswer();
|
||||
|
||||
|
Reference in New Issue
Block a user