certbot-heroku icon indicating copy to clipboard operation
certbot-heroku copied to clipboard

Env var is set but challenge fails

Open bee-keeper opened this issue 8 years ago • 2 comments

Hi there,

Thanks for this plugin, not sure why yet but I haven't been able to get it to work and I'm curious to how you're using the envvar in conjunction with url config.

I have the following setup in urls.py. The URL resolves but it never takes the env var even though I can see that it has been set. I have also tried to pick it up in settings.py but with similar results.

url(r'^.well-known/acme-challenge/[-\w]+$', lambda request: HttpResponse( os.getenv('LETS_ENCRYPT_CHALLENGE', ''), content_type="text/plain") ),

bee-keeper avatar Jun 21 '17 09:06 bee-keeper

I know nothing about the Python framework you are using (is it Django?)

Did you check the examples in the server folder? There is one for Django specifically, which includes a sampleurl() definition in urls.py That seems to define what method is called to answer requests matching the defined URL pattern, which is the letsencrypt_challenge_response method defined in views.py in the sample.

gboudreau avatar Jun 21 '17 13:06 gboudreau

Hi, thanks for the reply.

Yep it's Django, I didn't see you had an examples directory actually but looks like I set it up the same way regardless. Let me try get back with something more useful when i get a chance.

bee-keeper avatar Jun 21 '17 13:06 bee-keeper