Comments (6)
Hi @kajmagnus, yes you can definitely use the lua-resty-http in __index method since it's called inside a timer.
Adding a callback hook is a good syntax sugar feature, for now I guess you can get pretty much the same by just putting it into __index. Similarly you can also get the storage backend using require("resty.acme.autossl").storage
.
from lua-resty-acme.
@fffonion ok thanks, sounds good.
(Personally I'm guessing people would be fine with __index
, if there was just some docs mentioning that one can call Redis, or the app server, from __index
, and sample code about how to use it. I could reply here with some sample code, if I implement such an __index
function in the future — maybe in two or three months. )
A timer — that's Kong's lua-resty-timer, I'm guessing (?), i.e. extra timer functionality based on https://github.com/openresty/lua-nginx-module#ngxtimerat .
from lua-resty-acme.
Yeah i'll add a note in the readme on that.
Actually I made a mistake here, checking domain in the whitelist in run in the ssl_certificate_by context. But you can still use cosocket API i.e. doing network operations.
from lua-resty-acme.
@fffonion Wow that was fast :- )
From the new docs:
Do note that this will increase the SSL handshake latency
Is that for each connection, always, or just the very first connection when the HTTPS cert doesn't yet exist, and gets created?
from lua-resty-acme.
It's for each connection, always. Since we rely on that whitelist to decide "whether i'm going to serve certificate (or order a new one) for this domain".
But you can make it smarter by adding some cache for example.
from lua-resty-acme.
This is implemented as domain_whitelist_callback
and will be available in next release : )
from lua-resty-acme.
Related Issues (20)
- 按照Synopsis的步骤操作之后,没有生效,访问网站发现使用的是fallback证书,如何查找原因呢? HOT 4
- During renewal, errors on list() operation from consul storage is not logged: instead results in runtime error
- dns-01 challenge HOT 3
- How do I use ZeroSSL? HOT 3
- Error while trying to use subdomain with "_" simbol HOT 2
- How to use it? HOT 3
- -
- - HOT 1
- ZeroSSL integration failing to create account HOT 5
- How to configure other storage configs when in DB-less? HOT 2
- Zerossl config api_uri but error ngx.timer HOT 5
- Storage adapter not connect redis HOT 1
- -
- BoringSSL not working HTTP3 HOT 2
- error during acme login HOT 2
- get_certkey_parsed: Pass stale certificate if getting certificate from storage fails HOT 2
- Problem with update locks HOT 4
- Option to delete none whitelisted domains in certificate update HOT 2
- Check cache from domain_whitelist_callback? HOT 7
- Ability to block the first request until certs are created? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lua-resty-acme.