Skip to content

Making http_ssl_module optional #110

@mroach

Description

@mroach

Currently, nginx has to be compiled --with-http_ssl_module in order for this module to be compiled. There's just one line in the module that depends on this module being available:

const char *scheme = (r->connection->ssl) ? "https" : "http";

I took a whack at this locally, and this works:

#ifdef NGX_HTTP_SSL
      const char *scheme = (r->connection->ssl) ? "https" : "http";
#else
      const char *scheme = "http";
#endif

Would this be an acceptable change to make to the module? I'm happy to open a PR if so.
My C skills are nearly nil and I've never developed an nginx module, so I wanted to check first.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions