honerlaw / serverless-fargate-plugin

Serverless plugin to deploy fargate tasks to an ECS cluster.
44 stars 16 forks source link

Enhancement: Allow HTTP to forward to HTTPS #22

Open nomadinjax opened 4 years ago

nomadinjax commented 4 years ago

With the protocol configuration it would be great if there was a way to configure HTTP to simply redirect to HTTPS in all cases.

I do not know the best options to use to configure this but something along these lines would be great:

      protocols:
        - protocol: HTTP
          redirectHTTPS: true
        - protocol: HTTPS
          certificateArns:

This should change the HTTP ListenerRule to something like this:

    "Actions": [
      {
        "RedirectConfig" : {
          ...
        },
        "Type": "redirect"
      }
    ],