amplify-education / serverless-domain-manager

Serverless plugin for managing custom domains with API Gateways.
MIT License
938 stars 233 forks source link

Redirect Loop #216

Closed kalepail closed 5 years ago

kalepail commented 5 years ago

Community Note

Bug Report

Error Description Getting a redirect loop when using this with serverless-webpack and serverless-http. Not sure that's where the issue is coming from but I have successfully set this up with other applications so not sure why it would be redirect looping now.

Domain Manager Configuration

service: stellarql

provider:
  name: aws
  runtime: nodejs8.10
  profile: super

  environment:
    username: ${file(./env.yml):username}
    password: ${file(./env.yml):password}
    address: ${file(./env.yml):address}
    port: ${file(./env.yml):port}
    database: ${file(./env.yml):database}

functions:
  app:
    handler: server.run
    events:
      - http:
          path: /graphql
          method: POST
          cors: true
      - http:
          path: /graphiql
          method: GET
          cors: true

plugins:
  - serverless-webpack
  # - serverless-offline
  - serverless-domain-manager

custom:
  webpack:
    includeModules: true
  customDomain:
    domainName: stellarql.com
    certificateArn: arn:aws:acm:us-east-1:1234567890:certificate/abc-123-def-456
    basePath: ''
    stage: ${self:provider.stage}
    createRoute53Record: false
    enabled: true

Versions

{
  "name": "stellarql",
  "private": true,
  "scripts": {
    "dev": "sls offline start --skipCacheInvalidation",
    "deploy": "sls deploy"
  },
  "dependencies": {
    "@babel/polyfill": "^7.4.0",
    "body-parser": "^1.18.3",
    "cors": "^2.8.5",
    "express": "^4.16.4",
    "lodash": "^4.17.11",
    "morgan": "^1.9.1",
    "postgraphile": "^4.3.3",
    "postgraphile-plugin-connection-filter": "^1.0.0-rc.2",
    "serverless-http": "^1.9.1"
  },
  "devDependencies": {
    "@babel/cli": "^7.2.3",
    "@babel/core": "^7.4.0",
    "@babel/node": "^7.2.2",
    "@babel/preset-env": "^7.4.2",
    "babel-loader": "^8.0.5",
    "rimraf": "^2.6.3",
    "serverless-domain-manager": "^3.2.1",
    "serverless-offline": "^4.9.3",
    "serverless-webpack": "^5.2.0",
    "webpack": "^4.29.6",
    "webpack-node-externals": "^1.7.2"
  }
}

Additional context/Screenshots Screen Shot 2019-04-01 at 5 17 09 PM

kalepail commented 5 years ago

Resolved itself. Probably a DNS or caching issue. /shrug