jsoninfo: HTTP headers with CORS (if requested)
authorAlessio Caiazza <nolith@abisso.org>
Fri, 16 May 2014 10:53:15 +0000 (12:53 +0200)
committerAlessio Caiazza <nolith@abisso.org>
Sat, 17 May 2014 16:30:04 +0000 (18:30 +0200)
commit638788fdff7a3072b2dbb44853eae9a4b2f0a782
treed3831ab56a347516f0eec013df8b50a897c201a9
parentd0458699c446726f57f500b571f8f876cc957cf5
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