Commit Graph

790 Commits

Author SHA1 Message Date
Tomasz Sowa 05ecac8426 add support for more cookie flags in Request::AddCookie() method
changed in config options:
- renamed: http_session_id_name to session_cookie_name
- add config options: session_cookie_path, session_cookie_domain, session_cookie_same_site,
  session_cookie_http_only, session_cookie_secure
2022-09-08 05:40:44 +02:00
Tomasz Sowa 222a1c8a1f refactor the algorithm for testing the cors
while here:
- send cors headers even if the status is 404
- add: access_control_expose_headers config option - list of additional headers sent in Access-Control-Expose-Headers
- add: access_control_allow_credentials config option - if true return Access-Control-Allow-Credentials header equal "true"
2022-09-08 03:12:44 +02:00
Tomasz Sowa 04164ff967 add Access-Control-Allow-Credentials for simple requests too 2022-09-07 15:25:48 +02:00
Tomasz Sowa 9f64692ede set Access-Control-Allow-Credentials if available 2022-09-07 14:46:29 +02:00
Tomasz Sowa 8b9ad5d079 make depend 2022-09-01 07:34:39 +02:00
Tomasz Sowa bff435db9a add WINIX_SAVE_FILELOG plugin message 2022-09-01 07:34:10 +02:00
Tomasz Sowa e09a93bd72 update uikit to 3.15.6 2022-09-01 03:39:02 +02:00
Tomasz Sowa e378fcfe3b remove not used variables from Request 2022-08-31 21:33:54 +02:00
Tomasz Sowa a7a338f28e fix(Request): allow to prepare integer headers 2022-08-31 21:25:14 +02:00
Tomasz Sowa a19158cb62 add config options for testing the Origin header in cors requests
- allow_all_cors_origins - whether or not to allow all origins
- allowed_cors_origins - a list of allowed origins (used if allow_all_cors_origins is false)
2022-08-31 20:42:42 +02:00
Tomasz Sowa 778ed01a55 make depend 2022-08-30 01:52:20 +02:00
Tomasz Sowa 217f42b7c6 add support for preflight requ (cors) 2022-08-30 01:52:02 +02:00
Tomasz Sowa a34db6505d move some methods from App to Request
methods moved: SetEnv(), ReadEnvVariables(), ReadEnvRemoteIP(), CheckSSL(), SetSubdomain()

while here:
- add the rest of http methods: put, connect, trace, patch
2022-08-29 19:20:41 +02:00
Tomasz Sowa 7dc117da5e update UIkit to 3.15.5 2022-08-28 16:09:43 +02:00
Tomasz Sowa b1441366f4 add Http::verify_ssl(bool verify) method 2022-08-25 05:16:23 +02:00
Tomasz Sowa c730b85629 make depend 2022-08-22 16:04:10 +02:00
Tomasz Sowa d3a440fa0a add Request::AddPostVar(pt::Space & space, const wchar_t * name) 2022-08-22 16:03:07 +02:00
Tomasz Sowa 5f77ce619e make depend 2022-08-20 00:31:30 +02:00
Tomasz Sowa 5dd34c802e add Request::job_second_id 2022-08-20 00:31:10 +02:00
Tomasz Sowa 3609d94c09 update uikit to 3.15.3 2022-08-15 12:36:54 +02:00
Tomasz Sowa 5dc00e95e7 make depend 2022-08-14 12:55:03 +02:00
Tomasz Sowa e88615226b add Http::allow_redirects(bool allow_redirects) method 2022-08-13 20:00:15 +02:00
Tomasz Sowa ca1a854fd1 fix: use CURLOPT_POSTFIELDSIZE_LARGE to tell libcurl of the post content size 2022-08-13 17:15:48 +02:00
Tomasz Sowa ceb5336ca1 add support for OPTIONS http method 2022-08-11 08:04:40 +02:00
Tomasz Sowa f651df6e1f update htmx to 1.8.0 2022-08-10 12:42:24 +02:00
Tomasz Sowa 6266eac729 use std::wstring_view in SessionIdManager::DecodeToken(...) method 2022-08-10 12:42:16 +02:00
Tomasz Sowa de972de948 fix: remove sourcedialog plugin from ckeditor 2022-08-06 04:21:53 +02:00
Tomasz Sowa 55f48e4f3a update jquery to 3.6.0
while here do a check: [if not winix_has_jquery]...[end]
2022-07-31 02:03:39 +02:00
Tomasz Sowa 39ab07508f update translations 2022-07-30 18:41:59 +02:00
Tomasz Sowa 968660e8ca fix: set correctly request->session
The session cookie was not created because request->session pointed at
a temporary session.

While here:
- do some cleaning in App
- set request->mount too
- add fcgi_cannot_create_request_delay to the config
- fix: in mailregister plugin get model_connector from env (and not from the request)
2022-07-30 18:37:50 +02:00
Tomasz Sowa 4b46ba1fe3 update uikit to 3.15.1 2022-07-30 15:37:52 +02:00
Tomasz Sowa a164e6e21e fix: remove not needed Http::clear() 2022-07-30 04:14:04 +02:00
Tomasz Sowa 82281b4363 add a debug mode - fill a Space structure with some info from CURLOPT_DEBUGFUNCTION
while here:
- allow to set headers from a string
- add a seek function (CURLOPT_SEEKFUNCTION)
2022-07-30 04:00:35 +02:00
Tomasz Sowa 9d8d35b64f save logs after a job has finished 2022-07-30 03:35:00 +02:00
Tomasz Sowa 33f6a9a213 make depend 2022-07-30 03:33:45 +02:00
Tomasz Sowa e5ed1d6ae8 fix: do not use cur if login winix function if config.use_internal_loggin_mechanism is false
In the login winix function cur pointer will be null if config.use_internal_loggin_mechanism
is false, in such a case those objects are not registered as winix functions
but we have a public api
(the public api should be moved somewhere e.g. make a service layer)
2022-07-27 01:25:49 +02:00
Tomasz Sowa 9e6a5b2d37 add use_internal_session_mechanism and use_internal_loggin_mechanism config options 2022-07-26 21:54:33 +02:00
Tomasz Sowa c85a724fec fix(SessionIdManager): take a correct algorithm when decoding a token 2022-07-26 21:09:44 +02:00
Tomasz Sowa 2e8f4d1a26 allow the SessionIdManager to use only two keys 2022-07-26 05:18:42 +02:00
Tomasz Sowa 522b57ade4 fix(Jobs): change request state to prepare_to_finish in case of an error 2022-07-25 18:37:39 +02:00
Tomasz Sowa d4da6aa518 let System::PutUrlProto takes a stream by a reference to pt::Stream 2022-07-25 18:36:28 +02:00
Tomasz Sowa 979ef907fe allow a request to be processed in a job
Now we allow a request to be passed into a job queue,
and after the job finishes the request is passed into
a controller again. In order to achieve this we have
a requests queue in System, when we put a request
to the job this Request structure is preserved in the
queue and for a new request a new Request is added to
the queue.

while here:
- remove App::Lock()/Unlock(), use scoped locking
- fix: Plugin now has a Call method which takes ModelConnector
  and a logger (used in multithreaded environment)
- BaseThread has a main_model_connector pointer
  to the main (from the main thread) model connector
- the FastCGI structure fcgi_request moved from App to Request
- some methods for handling requests moved from App to Request
- small refactoring in main.cpp
- add Http class (a http client)
2022-07-25 14:21:21 +02:00
Tomasz Sowa b2d92b85a0 make depend 2022-07-11 17:52:05 +02:00
Tomasz Sowa 8d6d0ddbf8 update to the new morm::Finder interface 2022-07-11 17:51:50 +02:00
Tomasz Sowa 8da76134ce make depend 2022-07-05 19:52:40 +02:00
Tomasz Sowa 179daf743e make depend 2022-07-03 14:25:53 +02:00
Tomasz Sowa bcb009b606 print version information if running with -v parameter 2022-07-03 14:25:23 +02:00
Tomasz Sowa 327c215e5d add LICENSE file 2022-07-03 12:17:26 +02:00
Tomasz Sowa b484071818 print components versions in uname winix function 2022-07-03 12:17:14 +02:00
Tomasz Sowa 31e826d893 put a log message before opening the FastCGI connection socket
FCGX_OpenSocket will call exit() if there was a problem with creating the socket.
2022-06-27 20:52:09 +02:00