luci-base: add simple CORS handling to luci.dispatcher
authorJo-Philipp Wich <jo@mein.io>
Tue, 24 Apr 2018 18:32:47 +0000 (20:32 +0200)
committerJo-Philipp Wich <jo@mein.io>
Thu, 26 Apr 2018 06:26:30 +0000 (08:26 +0200)
commit8459ec0ec8321a3a4e153f31398e1fe0a9306885
tree41b9c4c3a2e43e6bb32cc23a756ca9457f688610
parent7d13ec601051bc78f8eb384dcd640c4a167b2556
luci-base: add simple CORS handling to luci.dispatcher

Support a new boolean property `cors` which - if set to true - causes the
dispatcher to positively answer CORS OPTIONS requests after authentication
without actually running the dispatching target.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
modules/luci-base/luasrc/dispatcher.lua