mirror of
https://github.com/livebook-dev/livebook.git
synced 2025-09-05 04:24:21 +08:00
Fix iframe static serving
This commit is contained in:
parent
04ac1751f6
commit
adb1c67937
1 changed files with 2 additions and 1 deletions
|
@ -4,6 +4,7 @@ defmodule LivebookWeb.IframeEndpoint do
|
|||
plug Plug.Static,
|
||||
at: "/iframe",
|
||||
from: {__MODULE__, :static_from, []},
|
||||
gzip: true,
|
||||
# Iframes are versioned, so we cache them for long
|
||||
cache_control_for_etags: "public, max-age=31536000",
|
||||
headers: [
|
||||
|
@ -13,7 +14,7 @@ defmodule LivebookWeb.IframeEndpoint do
|
|||
]
|
||||
|
||||
@doc false
|
||||
def static_from(), do: Path.join(Livebook.Config.priv_path(), "static_iframe")
|
||||
def static_from(), do: Path.join(Livebook.Config.priv_path(), "iframe_static")
|
||||
|
||||
plug :not_found
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue