Spaces:
Running
Running
fix: createAuthHeaders return shape
Browse files
server.js
CHANGED
|
@@ -101,9 +101,12 @@ app.use(
|
|
| 101 |
new HTTPFacilitatorClient({
|
| 102 |
url: FACILITATOR_URL,
|
| 103 |
...(FACILITATOR_API_KEY && {
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
|
|
|
|
|
|
|
|
|
| 107 |
}),
|
| 108 |
}),
|
| 109 |
[{ network: NETWORK, server: new ExactStellarScheme() }],
|
|
|
|
| 101 |
new HTTPFacilitatorClient({
|
| 102 |
url: FACILITATOR_URL,
|
| 103 |
...(FACILITATOR_API_KEY && {
|
| 104 |
+
// The lib calls this for each operation ("verify"/"settle"/"supported")
|
| 105 |
+
// and indexes into the returned object by op name.
|
| 106 |
+
createAuthHeaders: async () => {
|
| 107 |
+
const auth = { Authorization: `Bearer ${FACILITATOR_API_KEY}` };
|
| 108 |
+
return { verify: auth, settle: auth, supported: auth };
|
| 109 |
+
},
|
| 110 |
}),
|
| 111 |
}),
|
| 112 |
[{ network: NETWORK, server: new ExactStellarScheme() }],
|