We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 78c7b7c commit 05c9e42Copy full SHA for 05c9e42
lib/algora_web/controllers/og_image_controller.ex
@@ -49,7 +49,7 @@ defmodule AlgoraWeb.OGImageController do
49
{_, last_modified} ->
50
case DateTime.from_iso8601(convert_to_iso8601(last_modified)) do
51
{:ok, modified_at, _} ->
52
- DateTime.diff(DateTime.utc_now(), modified_at, :second) > @max_age
+ DateTime.diff(DateTime.utc_now(), modified_at, :second) > max_age()
53
54
_error ->
55
true
@@ -86,7 +86,7 @@ defmodule AlgoraWeb.OGImageController do
86
Task.start(fn ->
87
Algora.S3.upload(body, object_path,
88
content_type: "image/png",
89
- cache_control: "public, max-age=#{@max_age}"
+ cache_control: "public, max-age=#{max_age()}"
90
)
91
92
File.rm(filepath)
0 commit comments