sablierapp / sablier

Start your containers on demand, shut them down automatically when there's no activity. Docker, Docker Swarm Mode and Kubernetes compatible.
https://sablierapp.dev/
GNU Affero General Public License v3.0
1.36k stars 46 forks source link

nginx blocking strategy traceback: cannot get property "split" of undefined #244

Closed m0wer closed 4 months ago

m0wer commented 9 months ago

Describe the bug

The dynamic strategy works, but the blocking one doesn't. It looks like the code tries to access sablierNames which is not set in Nginx, only sablierGroup is.

The relevant configuration is:

location / {
    set $sablierBlockingTimeout 10m;
    set $sablierGroup something;
    set $sablierNginxInternalRedirect @container;
    js_content sablier.call;
  }

The traceback in /var/log/nginx/error.log is:

2024/01/09 06:09:20 [error] 1971121#1971121: *11 js exception: TypeError: cannot get property "split" of undefined
    at createBlockingUrl (/etc/nginx/conf.d/sablier.js:105)
    at buildRequest (/etc/nginx/conf.d/sablier.js:67)
    at call (/etc/nginx/conf.d/sablier.js:6)

Context

Expected behavior No traceback and works.

acouvreur commented 8 months ago

It seems that the nginx code is not yet up to date with groups!

I'll fix that in the next release, or if you want you can contribute and add the missing parameter!

acouvreur commented 8 months ago

:tada: This issue has been resolved in version 1.7.0-beta.2 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

github-actions[bot] commented 7 months ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

acouvreur commented 4 months ago

:tada: This issue has been resolved in version 1.7.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: