Skip to content

Commit

Permalink
fix: change redirect codes to 302
Browse files Browse the repository at this point in the history
301 means *Moved Permanently*
302 means *Moved Temporarily*
redirected-to URL might change in the future, so 302 should be used
  • Loading branch information
martinobersteiner committed Nov 13, 2024
1 parent 2e39908 commit f9a9100
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions invenio_records_lom/ui/records/records.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ def record_latest( # noqa: ANN201
record: RecordItem = None,
):
"""Redirect to record's landing page."""
return redirect(record["links"]["self_html"], code=301)
return redirect(record["links"]["self_html"], code=302)


@pass_record_from_pid
Expand All @@ -234,4 +234,4 @@ def record_from_pid( # noqa: ANN201
**__, # noqa: ANN003
):
"""Redirect to record's landing page."""
return redirect(record["links"]["self_html"], code=301)
return redirect(record["links"]["self_html"], code=302)

0 comments on commit f9a9100

Please sign in to comment.