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:52:43 +0000 (18:52 +0200)
commitb342385531c18b8afb42db64c7a38d7879668566
treeb3ed0eab614c77c55f5a38b2f0febd5b561b86c5
parent528176910ee1d00278e4108cc23d9f4f2de8a639
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