summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_controller.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nxt_controller.c')
-rw-r--r--src/nxt_controller.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/nxt_controller.c b/src/nxt_controller.c
index d1d8efbf..0fca81b6 100644
--- a/src/nxt_controller.c
+++ b/src/nxt_controller.c
@@ -769,6 +769,17 @@ nxt_controller_process_request(nxt_task_t *task, nxt_controller_request_t *req)
c = req->conn;
path = req->parser.path;
+ if (nxt_str_start(&path, "/config", 7)) {
+
+ if (path.length == 7) {
+ path.length = 1;
+
+ } else if (path.start[7] == '/') {
+ path.length -= 7;
+ path.start += 7;
+ }
+ }
+
if (path.length > 1 && path.start[path.length - 1] == '/') {
path.length--;
}