Merge pull request #2821 from appwrite/fix-0.12-letsencrypt

Fix: 0.12 LetsEncrypt generation
This commit is contained in:
Eldad A. Fux
2022-02-24 10:13:19 +02:00
committed by GitHub
+1 -4
View File
@@ -540,11 +540,8 @@ App::get('/.well-known/acme-challenge')
throw new Exception('Invalid challenge token.', 400);
}
$filePath = '/.well-known/acme-challenge' . $token;
$base = \realpath(APP_STORAGE_CERTIFICATES);
$path = \str_replace('/.well-known/acme-challenge/', '', $request->getURI());
$absolute = \realpath($base.'/.well-known/acme-challenge/'.$filePath);
$absolute = \realpath($base.'/.well-known/acme-challenge/'.$token);
if (!$base) {
throw new Exception('Storage error', 500);