Giter Club home page Giter Club logo

Comments (8)

waynegemmell avatar waynegemmell commented on June 6, 2024

This is a great feature. We need it too.

from lua-resty-auto-ssl.

nickpearson avatar nickpearson commented on June 6, 2024

If the request comes in over SSL, then the only way to respond to it (without causing the browser to show a certificate error) is using a cert that matches the request host. If the server's response uses a cert that doesn't match, then the browser will show a certificate error.

from lua-resty-auto-ssl.

waynegemmell avatar waynegemmell commented on June 6, 2024

Is there any way to run a script so that we can get alerted via another channel like Telegram or Slack?

from lua-resty-auto-ssl.

nickpearson avatar nickpearson commented on June 6, 2024

Yes, you'd just place your notification code in the if not has_cert then block in your sample code above. You can do whatever you want there on the server side — you just won't be able to successfully respond to the client's https request without a valid cert.

from lua-resty-auto-ssl.

waynegemmell avatar waynegemmell commented on June 6, 2024

Thanks. In the query above the OP says the call failed. Any idea why that would the case?

from lua-resty-auto-ssl.

nickpearson avatar nickpearson commented on June 6, 2024

I don't know the internals well enough to know why that would fail, but you could put your notification functionality in the allow_domain function just before you return false. e.g.:

auto_ssl:set("allow_domain", function(domain, auto_ssl, ssl_options, renewal)
  local domain_not_allowed = ...
  if domain_not_allowed
    notify_us_on_slack(domain)
    return false
  end
end

from lua-resty-auto-ssl.

waynegemmell avatar waynegemmell commented on June 6, 2024

ok, thanks

from lua-resty-auto-ssl.

 avatar commented on June 6, 2024

You can use lua redis package (reuse one provided with resty-auto-ssl) or other db provider, and check there, i've done similar things, it's not a lot of work, but seem to have lost the config i used 2-3 years ago

from lua-resty-auto-ssl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.