Skip to content

Failing to use the 'has_certificate' method #283

@petitiaux

Description

@petitiaux

I'm looking to forward http traffic to https, if there is a certificate found. We're using the has_certificate method for this. We've implemented the example code but nginx fails with the following log line:

lua entry thread aborted: runtime error: rewrite_by_lua(default.conf:34):2: attempt to call method 'has_certificate' (a nil value)

I've placed the code inside the server block listening on port 80.

Any help is greatly appreciated!

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