Skip to content

Commit

Permalink
hotfix: add cors
Browse files Browse the repository at this point in the history
  • Loading branch information
PofMagicfingers committed Apr 28, 2020
1 parent aa97304 commit 0f822f0
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 18 deletions.
2 changes: 2 additions & 0 deletions docker-compose.development.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ services:
networks:
- traefik
- podcloud
environment:
DEBUG: "*"
labels:
traefik.frontend.rule: "HostRegexp:feeds.{host:podcloud}.test"
traefik.frontend.priority: 500
Expand Down
77 changes: 60 additions & 17 deletions package-lock.json

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

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "podcloud-feeds",
"version": "1.2.21",
"version": "1.2.22",
"description": "GraphQL API for podcloud",
"scripts": {
"test": "NODE_ENV=test mocha --opts test/mocha.opts",
Expand All @@ -21,6 +21,7 @@
"cached": "^4.3.1",
"compression": "^1.7.1",
"config": "^1.26.2",
"cors": "^2.8.5",
"debug": "3.1.0",
"express": "4.16.2",
"express-pino-logger": "^4.0.0",
Expand Down
2 changes: 2 additions & 0 deletions src/server/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import compression from "compression"
import { graphqlExpress, graphiqlExpress } from "apollo-server-express"
import { makeExecutableSchema } from "graphql-tools"
import bodyParser from "body-parser"
import cors from "cors"

import pino from "express-pino-logger"

Expand Down Expand Up @@ -45,6 +46,7 @@ function GraphQLServer(config = DEFAULT_CONFIG) {

server.use(
"/graphql",
cors(),
bodyParser.json({ type: "*/*" }),
graphqlExpress(graphqlExpressOptions)
)
Expand Down

0 comments on commit 0f822f0

Please sign in to comment.