Skip to content

Commit 05c9e42

Browse files
committed
fix max_age
1 parent 78c7b7c commit 05c9e42

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/algora_web/controllers/og_image_controller.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ defmodule AlgoraWeb.OGImageController do
4949
{_, last_modified} ->
5050
case DateTime.from_iso8601(convert_to_iso8601(last_modified)) do
5151
{:ok, modified_at, _} ->
52-
DateTime.diff(DateTime.utc_now(), modified_at, :second) > @max_age
52+
DateTime.diff(DateTime.utc_now(), modified_at, :second) > max_age()
5353

5454
_error ->
5555
true
@@ -86,7 +86,7 @@ defmodule AlgoraWeb.OGImageController do
8686
Task.start(fn ->
8787
Algora.S3.upload(body, object_path,
8888
content_type: "image/png",
89-
cache_control: "public, max-age=#{@max_age}"
89+
cache_control: "public, max-age=#{max_age()}"
9090
)
9191

9292
File.rm(filepath)

0 commit comments

Comments
 (0)