Commit Graph

70 Commits

Author SHA1 Message Date
Igor Sysoev
7935ea4543 Round robin upstream added. 2020-03-06 18:28:54 +03:00
Igor Sysoev
643d4383fa Refactored nxt_http_action. 2020-03-04 14:03:32 +03:00
Axel Duch
f302ed0670 Fixed negative patterns combined with address rules. 2020-03-11 14:18:39 +00:00
Valentin Bartenev
a98de7f705 Added a "fallback" option to be used with the "share" action.
It allows proceeding to another action if a file isn't available.

An example:

    {
        "share": "/data/www/",

        "fallback": {
            "pass": "applications/php"
        }
    }

In the example above, an attempt is made first to serve a request with
a file from the "/data/www/" directory.  If there's no such file, the
request is passed to the "php" application.

Fallback actions may be nested:

    {
        "share": "/data/www/",

        "fallback": {
            "share": "/data/cache/",

            "fallback": {
                "proxy": "http://127.0.0.1:9000"
            }
        }
    }
2020-03-03 20:37:47 +03:00
Axel Duch
1a76371499 Router: introducing routing on listener address. 2019-12-24 13:59:58 +00:00
Axel Duch
8677bf8d41 Router: introducing routing on client address. 2019-12-24 13:58:10 +00:00
Igor Sysoev
ddde9c23cf Initial proxy support. 2019-11-14 16:39:54 +03:00
Igor Sysoev
14e56fe8c8 Replacing pass with action. 2019-11-14 16:39:48 +03:00
Valentin Bartenev
08a8d1510d Basic support for serving static files. 2019-09-19 02:47:09 +03:00
Axel Duch
7785c96c1a Added routing based on request scheme.
Scheme matches exact string “http” or “https”.
2019-07-24 13:47:35 +03:00
Igor Sysoev
1f8c395fc0 Cookie-based routing should be case-sensitive. 2019-06-10 18:47:35 +03:00
Igor Sysoev
6a775f58af Added routing based on cookies. 2019-05-30 15:33:51 +03:00
Igor Sysoev
5fb3daa5af Added routing based on arguments. 2019-05-30 15:33:51 +03:00
Igor Sysoev
16273cf1c6 Handling routing errors. 2019-05-30 15:33:51 +03:00
Igor Sysoev
0ba7cfce75 Added routing based on header fields. 2019-05-30 15:33:51 +03:00
Igor Sysoev
3aaebe4169 Fixed segfault with empty routes array. 2019-05-30 15:33:51 +03:00
Igor Sysoev
f2aa190f60 Fixed segfault with empty rule array. 2019-05-30 15:33:51 +03:00
Valentin Bartenev
f0cc14d394 Simplified cycles in nxt_http_route_rule(). 2019-04-12 17:44:54 +03:00
Igor Sysoev
8339b15158 Added support for wildcards in the middle of match patterns. 2019-04-10 13:47:34 +03:00
Igor Sysoev
d4ccaae900 Initial routing implementation. 2019-02-27 16:41:11 +03:00