-
-
Notifications
You must be signed in to change notification settings - Fork 489
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix robots.txt and sitemap 500 errors if no right content type is pro…
…vided (#7327) * Return 200 OK for robots.txt and sitemap. Return 200 OK for /robots.xt and /srv/api/sitemap instead of 500 "service not found". Previously if the request didn't contain "Accept: text/plain" or "Accept: application/xml" the server returned a 500 error. Now the server accepts any "Accept" header without complaining, returning a 200 response with "Content-Type: text/plain" or "Content-Type: application/xml" and the right content. * Disallow /catalog and /static in robots.txt. Some search engines are indexing the Angular JS HTML template files. Exclude the ${context_path}/catalog and ${context_path}/static from being crawled by robots. Fix #3585.
- Loading branch information
1 parent
4e2e182
commit 260719a
Showing
2 changed files
with
32 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters