Skip to content

parameter to enforce redirect HTTP to HTTPS #71

@jrenggli

Description

@jrenggli

It's often a use case to support both http and https connections but redirect all requests from http to https. Currently you'd have to configure two vhost resources for this. What I'm looking for is a simple parameter (e.g. ssl_enforce) to achieve this with only one vhost resource.

The following snippet should be added

server {
       listen         80;
       server_name    my.domain.com;
       return         301 https://$server_name$request_uri;
} 

What do you think about this? Is this somewhat useful? What should be the name of this parameter?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions