diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2017-02-12 02:18:58 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2017-02-12 02:18:58 +0900 |
| commit | 680f9a0b5c36d0ee459526a36419c5a5afd7b1e0 (patch) | |
| tree | 7665b99f6d87a540506c671094b64cd1891bca28 /src/api | |
| parent | [Test] Use JSON (diff) | |
| download | sharkey-680f9a0b5c36d0ee459526a36419c5a5afd7b1e0.tar.gz sharkey-680f9a0b5c36d0ee459526a36419c5a5afd7b1e0.tar.bz2 sharkey-680f9a0b5c36d0ee459526a36419c5a5afd7b1e0.zip | |
[Server] text/plainの場合もJSONとして解析するように
Diffstat (limited to 'src/api')
| -rw-r--r-- | src/api/server.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/api/server.ts b/src/api/server.ts index 75f9943ee7..390032f9a4 100644 --- a/src/api/server.ts +++ b/src/api/server.ts @@ -18,7 +18,9 @@ const app = express(); app.disable('x-powered-by'); app.set('etag', false); app.use(bodyParser.urlencoded({ extended: true })); -app.use(bodyParser.json()); +app.use(bodyParser.json({ + type: ['application/json', 'text/plain'] +})); app.use(cors({ origin: true })); |