Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ARXIVCE-3073 add nofollow header for all latexml-based HTML articles #830

Merged
merged 1 commit into from
Jan 23, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions browse/controllers/files/dissemination.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ def _html_response(file_list: Union[List[FileObj],FileObj],
resp= default_resp_fn(file_list, arxiv_id, docmeta, version)
resp.headers=add_surrogate_key(resp.headers,["html-latexml"])
if _is_html_name(file_list):
resp.headers['X-Robots-Tag'] = 'nofollow'
resp.headers["Link"] = f"<https://arxiv.org/html/{arxiv_id.id}>; rel='canonical'"
else:
# Not a data error since a non-html-source paper might legitimately not have a latexml HTML
Expand Down
Loading