<div style="font-family: Arial, sans-serif; font-size: 14px;"></div><div style="font-family: Arial, sans-serif; font-size: 14px; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);"><span>I'm trying to control buffering with variables, but nginx complains about it,</span></div><div style="font-family: Arial, sans-serif; font-size: 14px; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);"><br></div><div style="font-family: Arial, sans-serif; font-size: 14px; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);"><span><span>nginx: [emerg] invalid value "$val" in "proxy_request_buffering" directive, it must be "on" or "off" in /etc/nginx/sites-enabled/test.conf:9</span><br></span></div><div style="font-family: Arial, sans-serif; font-size: 14px; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);"><span><span><br></span></span></div><div style="font-family: Arial, sans-serif; font-size: 14px; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);"><span><span>Is there any way to resolve this? Attached the configuration in question.</span></span></div><div><span><br></span></div><div><span>server {</span></div><div><span>    listen 8888;</span></div><div><span>    set $val on;</span></div><div><br></div><div><span>    if ($request_uri ~* "enable") {</span></div><div><span>        set $val off;</span></div><div><span>    }</span></div><div><br></div><div><span>    proxy_request_buffering $val;</span></div><div><span>    proxy_buffering $val;</span></div><div><br></div><div><span>    location / {</span></div><div><span>        proxy_pass <a target="_blank" rel="noreferrer nofollow noopener" href="http://127.0.0.1:3333">http://127.0.0.1:3333</a>;</span></div><div><span>    }</span></div><span>}</span><div class="protonmail_signature_block" style="font-family: Arial, sans-serif; font-size: 14px;"><div class="protonmail_signature_block-proton">
    </div>
</div>