Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
jeancarlos-cpu committed Dec 10, 2019
1 parent faf2b98 commit 7552ea9
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/apollo-sever.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ const limiter = rateLimit({
max: 100 // limit each IP to 100 requests per windowMs
});

const csp = helmet.contentSecurityPolicy({
directives: {
defaultSrc: ["'self'"],
styleSrc: ["'seft'"]
}
});
// const csp = helmet.contentSecurityPolicy({
// directives: {
// defaultSrc: ["'self'"],
// styleSrc: ["'self'", "192.168.99.100:4466/"]
// }
// });

const whitelist = ["https://jeancarlos-cpu.github.io/"];

Expand All @@ -30,9 +30,9 @@ const corsOptions = {
};

const app = express();
app.use(helmet());
app.use(csp);
// app.use(cors(corsOptions));
// app.use(helmet());
// app.use(csp);
app.use(cors(corsOptions));
app.use(limiter);
app.use(compression());

Expand All @@ -46,7 +46,7 @@ const server = new ApolloServer({
});

server.applyMiddleware({ app });
app.listen(4000, () => console.log("server up."));
app.listen({ port: process.env.PORT || 4000 }, () => console.log("server up."));

// server
// .listen({ port: process.env.PORT || 4000 })
Expand Down

0 comments on commit 7552ea9

Please sign in to comment.