spec-3nweb-server 1.9.1 → 1.9.2
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.
|
@@ -21,7 +21,7 @@ const express = require("express");
|
|
|
21
21
|
function makeWellKnownApp(w3n) {
|
|
22
22
|
const app = express();
|
|
23
23
|
const w3nJson = confTo3NWebJSON(w3n);
|
|
24
|
-
app.get('3nweb.json', (req, res) => {
|
|
24
|
+
app.get('/3nweb.json', (req, res) => {
|
|
25
25
|
// the following implicitly sets content type application/json
|
|
26
26
|
res.status(200).json(w3nJson);
|
|
27
27
|
});
|
|
@@ -31,7 +31,7 @@ exports.makeWellKnownApp = makeWellKnownApp;
|
|
|
31
31
|
function confTo3NWebJSON(conf) {
|
|
32
32
|
const json = {};
|
|
33
33
|
const fields = ['3nstorage', 'asmail', 'mailerid'];
|
|
34
|
-
for (const field
|
|
34
|
+
for (const field of fields) {
|
|
35
35
|
const href = conf[field];
|
|
36
36
|
if (href) {
|
|
37
37
|
let u;
|
package/package.json
CHANGED
|
@@ -24,7 +24,7 @@ export function makeWellKnownApp(w3n: NonNullable<Configurations['wellKnown3NWeb
|
|
|
24
24
|
|
|
25
25
|
const w3nJson = confTo3NWebJSON(w3n);
|
|
26
26
|
|
|
27
|
-
app.get('3nweb.json', (req, res) => {
|
|
27
|
+
app.get('/3nweb.json', (req, res) => {
|
|
28
28
|
// the following implicitly sets content type application/json
|
|
29
29
|
res.status(200).json(w3nJson);
|
|
30
30
|
});
|
|
@@ -43,7 +43,7 @@ interface WellKnown3NWeb {
|
|
|
43
43
|
function confTo3NWebJSON(conf: NonNullable<Configurations['wellKnown3NWeb']>): WellKnown3NWeb {
|
|
44
44
|
const json: WellKnown3NWeb = {};
|
|
45
45
|
const fields: (keyof WellKnown3NWeb)[] = [ '3nstorage', 'asmail', 'mailerid' ];
|
|
46
|
-
for (const field
|
|
46
|
+
for (const field of fields) {
|
|
47
47
|
const href = conf[field];
|
|
48
48
|
if (href) {
|
|
49
49
|
let u: URL;
|