{"id":22275861,"url":"https://github.com/zigzagak/ngx_http_expr_module","last_synced_at":"2026-04-27T21:32:16.538Z","repository":{"id":148036408,"uuid":"215351039","full_name":"ZigzagAK/ngx_http_expr_module","owner":"ZigzagAK","description":"Nginx lazy computed complex variables","archived":false,"fork":false,"pushed_at":"2025-05-30T14:58:35.000Z","size":17,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-30T20:39:48.654Z","etag":null,"topics":["nginx","nginx-lazy-variable","nginx-variable"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ZigzagAK.png","metadata":{"files":{"readme":"README.markdown","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-10-15T16:53:35.000Z","updated_at":"2025-05-30T14:58:39.000Z","dependencies_parsed_at":"2025-05-30T16:23:16.169Z","dependency_job_id":"83fd7aa7-c51d-4734-93d2-e35546529337","html_url":"https://github.com/ZigzagAK/ngx_http_expr_module","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ZigzagAK/ngx_http_expr_module","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZigzagAK%2Fngx_http_expr_module","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZigzagAK%2Fngx_http_expr_module/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZigzagAK%2Fngx_http_expr_module/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZigzagAK%2Fngx_http_expr_module/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ZigzagAK","download_url":"https://codeload.github.com/ZigzagAK/ngx_http_expr_module/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZigzagAK%2Fngx_http_expr_module/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32356598,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-27T20:07:02.737Z","status":"ssl_error","status_checked_at":"2026-04-27T20:07:00.910Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["nginx","nginx-lazy-variable","nginx-variable"],"created_at":"2024-12-03T14:12:42.263Z","updated_at":"2026-04-27T21:32:16.532Z","avatar_url":"https://github.com/ZigzagAK.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"Name\n====\n\nngx_http_expr_module - lazy computed complex variables.\n\nTable of Contents\n=================\n\n* [Name](#name)\n* [Status](#status)\n* [Synopsis](#synopsis)\n* [Description](#description)\n* [Configuration directives](#configuration-directives)\n\nStatus\n======\n\nThis library is production ready.\n\nDescription\n===========\n\nModule makes possible declare complex variables with lazy computation. This is may be used to choose access_log format dynamically.\n\n[Back to TOC](#table-of-contents)\n\nSynopsis\n========\n\n```nginx\nhttp {\n    log_format  main  $format;\n\n    access_log  logs/access.log  main;\n\n    expr_max_hash_size 10240;\n\n    server {\n        listen 4444;\n\n        location /test1 {\n            expr $format '1111 $remote_addr - $remote_user [$time_local] \"$request\" $status $request_time $upstream_addr';\n            return 200 test1;\n        }\n\n        location /test2 {\n            expr $format '2222 $remote_addr - $remote_user [$time_local] \"$request\" $status $request_time $upstream_addr';\n            return 200 test2;\n        }\n\n        location /test3 {\n            expr $format '3333 $remote_addr - $remote_user [$time_local] \"$request\" $status $request_time $upstream_addr';\n            echo_exec @inner1;\n        }\n\n        location @inner1 {\n            echo_exec @inner2;\n        }\n\n        location @inner2 {\n            return 200 $uri;\n        }\n    }\n}\n```\n\n[Back to TOC](#table-of-contents)\n\nConfiguration directives\n========================\n\nexpr_if_empty\n-------------\n* **syntax**: `expr_if_empty $var \u003ccomplex value\u003e`\n* **context**: `location`\n\nDeclare complex variable with lazy computation.\n\nIn runtime set value if variable is empty.\n\nDirective is not support inheritance.\n\n[Back to TOC](#table-of-contents)\n\nexpr\n----\n* **syntax**: `expr $var \u003ccomplex value\u003e`\n* **context**: `location`\n\nDeclare complex variable with lazy computation.\n\nDirective is not support inheritance.\n\n[Back to TOC](#table-of-contents)\n\nexpr_max_hash_size\n------------------\n* **syntax**: `expr $var \u003ccomplex value\u003e`\n* **default**: 1024\n* **minimum**: 256\n* **context**: `http,server,location`\n\nMaximum number of locations per variable.\n\n[Back to TOC](#table-of-contents)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzigzagak%2Fngx_http_expr_module","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzigzagak%2Fngx_http_expr_module","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzigzagak%2Fngx_http_expr_module/lists"}