]> git.ipfire.org Git - thirdparty/asterisk.git/commit
http: Add ability to disable /httpstatus URI
authorSean Bright <sean.bright@gmail.com>
Wed, 22 Jan 2020 15:39:47 +0000 (10:39 -0500)
committerSean Bright <sean.bright@gmail.com>
Wed, 22 Jan 2020 16:10:14 +0000 (10:10 -0600)
commit0dce6f746bed6340e5e11ecbb5bb9f2f7926537f
treef2f9fe395155754ad1543e2fc99334cfd14ae980
parentb073b4318ab7fec35f3d838619a6057faa39ac32
http: Add ability to disable /httpstatus URI

Add a new configuration option 'enable_status' which allows the
/httpstatus URI handler to be administratively disabled.

We also no longer unconditionally register the /static and /httpstatus
URI handlers, but instead do it based upon configuration.

Behavior change: If enable_static was turned off, the URI handler was
still installed but returned a 403 when it was accessed. Because we
now register/unregister the URI handlers as appropriate, if the
/static URI is disabled we will return a 404 instead.

Additionally:

* Change 'enablestatic' to 'enable_static' but keep the former for
  backwards compatibility.
* Improve some internal variable names

ASTERISK-28710 #close

Change-Id: I647510f796473793b1d3ce1beb32659813be69e1
configs/samples/http.conf.sample
doc/CHANGES-staging/http.txt [new file with mode: 0644]
main/http.c