Skip to content

Commit

Permalink
add CORS
Browse files Browse the repository at this point in the history
  • Loading branch information
10A7 committed Feb 10, 2018
1 parent 890b2de commit 940c40d
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ if (cluster.isMaster) {
} else {
const express = require('express');
const bodyParser = require('body-parser');
const cors = require('cors');
const http = require('http');
const path = require('path');
const app = express();
Expand All @@ -33,6 +34,7 @@ if (cluster.isMaster) {

app.set('port', process.env.PORT || 8080);
app.use(helmet());
app.use(cors());
app.use(bodyParser.json());

// configure rate limiting
Expand Down
14 changes: 14 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"homepage": "https://github.com/10a7/eth-gas-json#readme",
"dependencies": {
"body-parser": "^1.18.2",
"cors": "^2.8.4",
"dotenv": "^4.0.0",
"express": "^4.16.2",
"express-rate-limit": "^2.11.0",
Expand Down

0 comments on commit 940c40d

Please sign in to comment.