-1

We have a OpenResty, Nginx and Redis stack. I have a location block in my nginx.conf which doesn't reponse to any changes I do.

I have a Lua module function that is invoked by location in nginx.conf. The function is like:

function _M.myFunction()
        ngx.header["Content-Type"] = "text/html"
        ngx.say("debug")
end

I have a location like this - this location was set to another function that returned text/plain Content-Type with an empty string (ngx.say(" ") and I now pointed it to my debug function, it seems that it is "stuck" on previous response:

   location /.faulty/foo/{
    content_by_lua_block {
          myLuaModule:myFunction()
    }
}

responding with:

HTTP/1.1 200 OK
Content-Type: application/octet-stream
Transfer-Encoding: chunked
Connection: keep-alive

with no body in response.

Testing by adding a different locations seems to working great for the same function and getting me the response I want:

location /.test/foo/{
        content_by_lua_block {
              myLuaModule:myFunction()
        }
    }

responding with:

HTTP/1.1 200 OK
Content-Type: text/html
Connection: keep-alive

debug

I checked Redis for any key that might hold this location, and couldn't find anything relevant.

Itai Malek
  • 301
  • 2
  • 5
  • 14

1 Answers1

0

so, for future generations - there was a LB server in front of that server with the exact same function and location. once changed there the change was refreshed.

Itai Malek
  • 301
  • 2
  • 5
  • 14