History log of /unit/src/ (Results 76 – 100 of 1148)
Revision (<<< Hide revision tags) (Show revision tags >>>)Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
1970:06f77fc5a47912-Oct-2021 Zhidao HONG

Removed unused declarations.

Declarations became unused after 6976d36be926.

No functional changes.

1969:be6409cdb02809-Oct-2021 Zhidao HONG

Configuration: automatic migration to the new "share" behavior.

1967:98e518a1c90e08-Oct-2021 Artem Konev

Fixed invalid call sequence in nxt_tls_ticket_key_callback().

The bug has been introduced in 0bca988e9541.

1963:9045a8bb896a04-Oct-2021 Valentin Bartenev

Static: removed surplus assignment.

It's not needed after 69d823e5710a.
Found by Clang Static Analyzer.

1962:13542e2a30e304-Oct-2021 Valentin Bartenev

Static: fixed possible descriptor leak introduced in a946d8cd7f8c.

1961:69d823e5710a01-Oct-2021 Zhidao HONG

Static: multiple paths in the "share" option.

1960:a5c08e4a994630-Sep-2021 Zhidao HONG

Static: variables in the "share" option.

This commit supports variable in the "share" option, the finding path to
file serve is the value from "share". An example:
{
"share": "/www/data/static$u

Static: variables in the "share" option.

This commit supports variable in the "share" option, the finding path to
file serve is the value from "share". An example:
{
"share": "/www/data/static$uri"
}

show more ...

1959:45b25ffb2e8c28-Sep-2021 Zhidao HONG

Static: variables in the "chroot" option.

1956:f4c32c2d595d20-Sep-2021 Max Romanov

Fixed WebSocket connection hang issue after listener reconfigure.

Because the configuration values were read from the listener's configuration,
an established WebSocket connection was unable to work

Fixed WebSocket connection hang issue after listener reconfigure.

Because the configuration values were read from the listener's configuration,
an established WebSocket connection was unable to work properly (i. e. stuck)
if the listener was removed. The correct source of configuration values is the
request config joint.

This is related to issue #581 on GitHub.

show more ...

1955:e834792ed4e314-Sep-2021 Max Romanov

Fixing build with glibc 2.34.

Explicitly using the sysconf() call to obtain the minimum thread stack size
instead of the PTHREAD_STACK_MIN macro.

This closes #576 PR on GitHub.

1954:8f18a05d4c5807-Sep-2021 Zhidao HONG

Router: refactored variable pass.

Since the "pass" option supports both strings and variables, a generic
nxt_var_t structure can be used in the configuration phase, and the "name"
field in actions i

Router: refactored variable pass.

Since the "pass" option supports both strings and variables, a generic
nxt_var_t structure can be used in the configuration phase, and the "name"
field in actions is redundant.

No functional changes.

show more ...

1953:6b3c68839a1106-Sep-2021 Zhidao HONG

Var: keeping raw variable string for debug.

1952:0bca988e954125-Aug-2021 Valentin Bartenev

TLS: refactored nxt_tls_ticket_key_callback().

Deduplicated code and improved style.
No functional changes.

Revision tags: 1.25.0-1, 1.25.0
1942:296628096d6c17-Aug-2021 Andrey Suvorov

Added TLS session tickets support.

1940:29c2c9d80c5b12-Aug-2021 Zhidao HONG

Introduced the generic API nxt_buf_dummy_completion().

No functional changes.

1939:bdaa7bd2730012-Aug-2021 Zhidao HONG

Log: renamed related variables "log" as "_log" to prevent conflicts.

1936:953434450ea912-Aug-2021 Oisin Canty

Router: client IP address replacement.

This commit introduces the replacement of the client address based on the value
of a specified HTTP header. This is intended for use when Unit is placed
behin

Router: client IP address replacement.

This commit introduces the replacement of the client address based on the value
of a specified HTTP header. This is intended for use when Unit is placed
behind a reverse proxy like nginx or a CDN.

You must specify the source addresses of the trusted proxies. This can be
accomplished with any valid IP pattern supported by Unit's match block:

["10.0.0.1", "10.4.0.0/16", "!192.168.1.1"]

The feature is configured per listener.

The client address replacement functionality only operates when there is a
source IP match and the specified header is present. Typically this would be
an 'X-Forwarded-For' header.

{
"listeners": {
"127.0.0.1:8080": {
"client_ip": {
"header": "X-Forwarded-For",
"source": [
"10.0.0.0/8"
]
},
"pass": "applications/my_app"
},
}
}

If a request occurs and Unit receives a header like below:

"X-Forwarded-For: 84.123.23.23"

By default, Unit trusts the last rightmost IP in the header, so REMOTE_ADDR
will be set to 84.123.23.23 if the connection originated from 10.0.0.0/8.

If Unit runs behind consecutive reverse proxies and receives a header similar
to the following:

"X-Forwarded-For: 84.123.23.23, 10.0.0.254"

You will need to enable "recursive" checking, which walks the header from
last address to first and chooses the first non-trusted address it finds.

{
"listeners": {
"127.0.0.1:8080": {
"client_ip": {
"header": "X-Forwarded-For",
"source": [
"10.0.0.0/8"
]
"recursive": true,
},
"pass": "applications/my_app"
},
}
}

If a connection from 10.0.0.0/8 occurs, the chain is walked. Here, 10.0.0.254
is also a trusted address so the client address will be replaced with
84.123.23.23.

If all IP addresses in the header are trusted, the client address is set to
the first address in the header:

If 10.0.0.0/8 is trusted and "X-Forwarded-For: 10.0.0.3, 10.0.0.2, 10.0.0.1",
the client address will be replaced with 10.0.0.3.

show more ...

1935:ba08638c325912-Aug-2021 Oisin Canty

Introduced nxt_sockaddr_parse_optport() for addresses w/o ports.

1932:ee35fc1dca3309-Aug-2021 Max Romanov

Python: fixing misprint in error message.

1930:fb8b29aac7a105-Aug-2021 Oisin Canty

Router: fixed crash when matching an empty address pattern array.

A crash would occur when the router tried to match an
against an empty address pattern array.

The following configuration was used

Router: fixed crash when matching an empty address pattern array.

A crash would occur when the router tried to match an
against an empty address pattern array.

The following configuration was used to reproduce the
issue:

{
"listeners": {
"127.0.0.1:8082": {
"pass": "routes"
}
},
"routes": [
{
"match": {
"source": []
},
"action": {
"return": 200
}
}
]
}

show more ...

1928:ae4f067a9ea401-Aug-2021 Zhidao HONG

Router: fixed segmentation fault.

In the case that routes or upstreams is empty and the pass option is a variable.
If the resolved pass is routes or upstreams, a segment error occurred.

1927:ac8d11e3442703-Aug-2021 Max Romanov

Fixed dead assignments.

Found by Clang Static Analyzer.

1926:6e85d6c0b8bb29-Jul-2021 Max Romanov

Application restart introduced.

When processing a restart request, the router sends a QUIT message to all
existing processes of the application. Then, a new shared application port is
created to en

Application restart introduced.

When processing a restart request, the router sends a QUIT message to all
existing processes of the application. Then, a new shared application port is
created to ensure that new requests won't be handled by the old processes of
the application.

show more ...

1925:b8a2ac61895024-Jul-2021 Zhidao HONG

Router: split nxt_http_app_conf_t from nxt_http_action_t.

No functional changes.

1924:96d090de753426-Jul-2021 Zhidao HONG

Router: renamed nxt_http_proxy_create() as nxt_http_proxy_init().

No functional changes.

12345678910>>...46