drupal-project
drupal-project copied to clipboard
Add 404 status for MS 365 autodiscover requests and omit log entries
Sth like this:
nginx:
extra_conditions: |
# 404 status for MS 365 autodiscover requests and omit log entries
location ~ /autodiscover/autodiscover.xml {
return 404;
access_log off;
log_not_found off;
}
Slack: https://wunder.slack.com/archives/C8UN6AG9W/p1647591467861449
Saimons Jēgers:
Actually in Artis copied text both use cases say that it’s used for case-insensitive scenarios which doesn’t look right. It’s a typo on that blog/site. Link to it And this is just above the text:
~: The tilde sign is used for case-sensitive regular expression match against a requested URI. ~*: The tilde followed by asterisk sign is used for case insensitive regular expression match against a requested URI.So it should be
~*after all.
This should be the correct one:
locationExtraConfig: |
# Add 404 status for autodiscover.xml requests and omit log entries.
location ~* /autodiscover/autodiscover.xml {
return 404;
access_log off;
log_not_found off;
}