I purchased a SSL cert online and now ind the mid of verifying my host. How it works is:
Now I'm at step 2.
I'm trying to return a file (static) from an URL, as required by Comodo to verify my server. So basically, I think if I access this link:
http://your(sub)domain/.well-known/pki-validation/<filename.txt>
The guide is here:
https://helpdesk.ssls.com/hc/en-us/articles/206957109-How-can-I-complete-the-domain-control-validation-DCV-for-my-SSL-certificate-
Can you guys help how I can return a file with this URL? Thanks!
Thanks for all your help. I actually found out that it was pretty straight forward.
I just put a path in my urls.py
as below:
urlpatterns = [
path('.well-known/pki-validation/xxxyyyzzz.txt', read_file),
]
Then my read_file
function just simply return the file with
def read_file(request):
f = open('.well-known/pki-validation/xxxyyyzzz.txt', 'r')
file_content = f.read()
f.close()
return HttpResponse(file_content, content_type="text/plain")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With