Keep server details out of API answers
An unexpected error now sends a general message, and the log keeps the text. A job no longer shows the path of its uploaded file. A cover is cached only by the browser of the user.
This commit is contained in:
@@ -222,6 +222,7 @@ def test_the_cover_of_a_story(client):
|
||||
response = client.get(f"/api/stories/{story_id}/cover?v={version}")
|
||||
assert (response.status_code, response.mimetype, response.data) == (200, "image/png", PNG)
|
||||
assert response.cache_control.max_age == 365 * 24 * 60 * 60
|
||||
assert response.cache_control.private and not response.cache_control.public
|
||||
|
||||
# A new cover gets a new version, so the browser loads it.
|
||||
store.put_image(story_id, "https://example.com/new.jpg", "jpg", "image/jpeg", b"new", is_cover=True)
|
||||
|
||||
Reference in New Issue
Block a user