now letsencrypt is creating a .htaccess file with re-write rules which kills most of our .well-known routes
This commit is contained in:
parent
aec92e0e17
commit
6d87311394
@ -119,6 +119,18 @@ class Router {
|
||||
|
||||
if(! (\App::$module_loaded)) {
|
||||
|
||||
// undo the setting of a letsencrypt acme-challenge rewrite rule
|
||||
// which blocks access to our .well-known routes.
|
||||
// Also provide a config setting for sites that have a legitimate need
|
||||
// for a custom .htaccess in the .well-known directory; but they should
|
||||
// make the file read-only so letsencrypt doesn't modify it
|
||||
|
||||
if(strpos($_SERVER['REQUEST_URI'],'/.well-known/') === 0) {
|
||||
if(file_exists('.well-known/.htaccess') && get_config('system','fix_apache_acme',true)) {
|
||||
rename('.well-known/.htaccess','.well-known/.htaccess.old');
|
||||
}
|
||||
}
|
||||
|
||||
$x = [
|
||||
'module' => $module,
|
||||
'installed' => \App::$module_loaded,
|
||||
|
Reference in New Issue
Block a user