Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2016
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. commit 896fc814f874ccf256959823b0b80390b6ff0079
  2. Author: Bogdan Sima <bogdan@gyglish.com>
  3. Date: Tue Feb 23 22:41:06 2016 +0100
  4.  
  5. Return LETSENCRYPT_TOKEN token at LETSENCRYPT_ROUTE route
  6.  
  7. diff --git a/app/__init__.py b/app/__init__.py
  8. index c2f4d938cb17..eea6e107ffed 100644
  9. --- a/app/__init__.py
  10. +++ b/app/__init__.py
  11. @@ -66,6 +66,11 @@ def site_verification():
  12. return app.send_static_file("site_verification.html")
  13.  
  14.  
  15. +@app.route(app.config['LETSENCRYPT_ROUTE'])
  16. +def certificate_verification():
  17. + """Returns letsencrypt verification token"""
  18. + return app.config['LETSENCRYPT_TOKEN']
  19. +
  20. # Robots file
  21. @app.route("/robots.txt")
  22. def robots_txt():
  23. diff --git a/config.py b/config.py
  24. index 95f7326bf290..3382dee89586 100644
  25. --- a/config.py
  26. +++ b/config.py
  27. @@ -15,6 +15,8 @@ class Config(object):
  28. # Credentials for admin
  29. ADMIN_USER = 'admin'
  30. ADMIN_PASS = 'password'
  31. + LETSENCRYPT_ROUTE = '/certificate/verification/route'
  32. + LETSENCRYPT_TOKEN = 'test-toKen'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement