jsoninfo: HTTP headers with CORS (if requested)
authorAlessio Caiazza <nolith@abisso.org>
Fri, 16 May 2014 10:53:15 +0000 (12:53 +0200)
committerSaverio Proto <zioproto@gmail.com>
Sat, 17 May 2014 16:53:43 +0000 (18:53 +0200)
commit972ca42c89eb0dd1e2a8979c620fa43db6ae1c6d
treecb75b25173b38f9c9262e3498926323fc3fe30f4
parenteb7dda86ccc5884b19e166915c9621fa71397390
jsoninfo: HTTP headers with CORS (if requested)

The new "httpheaders" parameter prepends HTTP headers to the reply.
If not set it will default to "no" and have the same behaviour as before.
Cross-origin resource sharing headers (CORS) are included in reply allowing the
json retrieval by javascript applications not served by olsrd itself.
This will allow to easily develop js applications running directly in the
browser.

Reviewed-by: Ferry Huberts <ferry.huberts@pelagic.nl>
lib/jsoninfo/README_JSONINFO
lib/jsoninfo/src/olsrd_jsoninfo.c
lib/jsoninfo/src/olsrd_jsoninfo.h
lib/jsoninfo/src/olsrd_plugin.c