|
|
@@ -10,6 +10,7 @@ import {
|
|
|
import { queries } from 'iroha-helpers'
|
|
|
import util from 'util'
|
|
|
import { exec } from 'child_process'
|
|
|
+import cors from 'cors'
|
|
|
|
|
|
const app = express();
|
|
|
app.use(bodyParser.json());
|
|
|
@@ -18,6 +19,9 @@ app.use(basicAuth({
|
|
|
challenge: true
|
|
|
}));
|
|
|
|
|
|
+//TODO is cors package necesary? basic middleware could suffice
|
|
|
+app.use(cors()); //TODO: set only safe origins
|
|
|
+
|
|
|
const asyncExec = util.promisify(exec);
|
|
|
|
|
|
const IROHA_ADMIN_PRIV = "f101537e319568c765b2cc89698325604991dca57b9716b58016b253506cab70";
|