instedd / verboice

Open source toolkit for voice services; with special focus to the needs of medium- and low-income countries, scalable services, and interacting with vulnerable populations
http://verboice.instedd.org/
GNU General Public License v3.0
45 stars 18 forks source link

Make broker respond 200 OK on root path #919

Closed matiasgarciaisaia closed 2 years ago

matiasgarciaisaia commented 2 years ago

Whenever the broker gets a 'GET /' request, respond an HTTP 200 OK instead of an error.

This helps healthchecks to succeed.

matiasgarciaisaia commented 2 years ago

I'm really interested in your opinions on the matter :)

ggiraldez commented 2 years ago

I'm really interested in your opinions on the matter :)

Well, I doubt that stacking modules is the intended way to do proper routing. I don't think it scales. We are stretching the capabilities of httpd though. For this use case it's fine because we have 3 content-providing modules, but long term I'd change httpd for something better (is cowboy still a thing?). Anyway, nothing actionable right now I don't think.

matiasgarciaisaia commented 2 years ago

I know cowboy is somewhere there in Surveda's stack, but I don't even know if Surveda is up-to-date with dependencies to be honest.

Thanks for raising this concern!

ysbaddaden commented 2 years ago

@matiasgarciaisaia Surveda is using Cowboy 2 and should be up to date, but the Elixir version and Phoenix versions are still lagging.

Anyway, this is Verboice here :)

matiasgarciaisaia commented 2 years ago

@ysbaddaden Yeah, I know they're different projects 😂 It was just my answer to Gus' "is cowboy still a thing?"

ysbaddaden commented 2 years ago

Oh! In that case, yeah, Cowboy is still the http server for Erlang/Elixir!