ldn-inbox-server 1.0.3 → 1.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -11,7 +11,7 @@ const JSON_SCHEMA_PATH = './config/offer_schema.json';
11
11
 
12
12
  program
13
13
  .name('lnd-inbox-server')
14
- .version('1.0.3')
14
+ .version('1.0.5')
15
15
  .description('A demonstration Event Notifications Inbox server');
16
16
 
17
17
  program
package/index.js CHANGED
@@ -21,7 +21,7 @@ log4js.configure({
21
21
 
22
22
 
23
23
  function inbox_server(options) {
24
- INBOX = options['inbox'];
24
+ INBOX_PATH = options['inbox'];
25
25
  JSON_SCHEMA = JSON.parse(fs.readFileSync(options['schema'], { encoding: 'utf-8'}));
26
26
  let registry = [{ path : 'inbox/.*' , do: doInbox }];
27
27
 
@@ -55,9 +55,9 @@ function doInbox(req,res) {
55
55
 
56
56
  const headers = req.headers;
57
57
 
58
- if (headers && (
59
- headers['content-type'] === 'application/ld+json' ||
60
- headers['content-type'] === 'application/json'
58
+ if (headers && headers['content-type'] && (
59
+ headers['content-type'].startsWith('application/ld+json') ||
60
+ headers['content-type'].startsWith('application/json')
61
61
  )
62
62
  ) {
63
63
  // We are ok
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ldn-inbox-server",
3
- "version": "1.0.3",
3
+ "version": "1.0.5",
4
4
  "description": "A demonstration Event Notifications Inbox server",
5
5
  "main": "index.js",
6
6
  "author": "Patrick Hochstenbach <Patrick.Hochstenbach@UGent.be>",