Commit 73839038 authored by Dom Sekotill's avatar Dom Sekotill
Browse files

Handle /.well-known/ URIs as static files

If the URI is not found in the static files return 404 instead of
delegating to /index.php

Various tools may repeatedly poll or scan for entries under this path,
so don't waste CPU time delegating requests to PHP scripts which will
most likely not have anything to handle them.

This could all change if it emerges that there are plugins which do
handle requests under the /.well-known/ path, in which case it will
probably be made optional.
parent 39b24e48
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -35,6 +35,13 @@ server {
		try_files favicon.ico =404;
	}

	# Don't delegate to index.php for /.well-known/
	# If a plugin wants to handle /.well-known/ URIs please submit an issue to
	# https://code.kodo.org.uk/singing-chimes.co.uk/wordpress/
	location /.well-known/ {
		try_files $uri =404;
	}

	# block the XMLRPC script
	location = /xmlrpc.php {
		return 404;