Skip to content

Commit

Permalink
use new plug in 0.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonyshull committed Nov 13, 2024
1 parent 205a92d commit a099dc4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 17 deletions.
17 changes: 3 additions & 14 deletions lib/dotcom_web/router.ex
Original file line number Diff line number Diff line change
Expand Up @@ -260,22 +260,11 @@ defmodule DotcomWeb.Router do
end
end

if Mix.env() == :dev do
pipeline :allow_insecure_headers do
plug(:accepts, ["html"])
plug(:fetch_session)
plug(:protect_from_forgery)
plug(:put_insecure_headers)
end

defp put_insecure_headers(conn, _) do
conn
|> put_resp_header("access-control-allow-origin", "*")
|> put_resp_header("content-security-policy", "frame-ancestors *;")
end
import KinoLiveComponent.Plug, only: [allow_insecure_connection: 2]

if Mix.env() == :dev do
scope "/kino-live-component", KinoLiveComponent do
pipe_through([:allow_insecure_headers])
pipe_through([:allow_insecure_connection])

live("/", Live.Index)
end
Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ defmodule DotCom.Mixfile do
{:html_sanitize_ex, "1.4.3"},
{:httpoison, "2.2.1"},
{:inflex, "2.1.0"},
{:kino_live_component, "0.0.2"},
{:kino_live_component, "0.0.3"},
{:jason, "1.4.4", override: true},
{:logster, "1.1.1"},
{:mail, "0.4.1"},
Expand Down
4 changes: 2 additions & 2 deletions mix.lock
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"crc": {:hex, :crc, "0.10.5", "ee12a7c056ac498ef2ea985ecdc9fa53c1bfb4e53a484d9f17ff94803707dfd8", [:mix, :rebar3], [{:elixir_make, "~> 0.6", [hex: :elixir_make, repo: "hexpm", optional: false]}], "hexpm", "3e673b6495a9525c5c641585af1accba59a1eb33de697bedf341e247012c2c7f"},
"credo": {:hex, :credo, "1.7.8", "9722ba1681e973025908d542ec3d95db5f9c549251ba5b028e251ad8c24ab8c5", [:mix], [{:bunt, "~> 0.2.1 or ~> 1.0", [hex: :bunt, repo: "hexpm", optional: false]}, {:file_system, "~> 0.2 or ~> 1.0", [hex: :file_system, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "cb9e87cc64f152f3ed1c6e325e7b894dea8f5ef2e41123bd864e3cd5ceb44968"},
"csv": {:hex, :csv, "3.2.1", "6d401f1ed33acb2627682a9ab6021e96d33ca6c1c6bccc243d8f7e2197d032f5", [:mix], [], "hexpm", "8f55a0524923ae49e97ff2642122a2ce7c61e159e7fe1184670b2ce847aee6c8"},
"decimal": {:hex, :decimal, "2.1.1", "5611dca5d4b2c3dd497dec8f68751f1f1a54755e8ed2a966c2633cf885973ad6", [:mix], [], "hexpm", "53cfe5f497ed0e7771ae1a475575603d77425099ba5faef9394932b35020ffcc"},
"decimal": {:hex, :decimal, "2.2.0", "df3d06bb9517e302b1bd265c1e7f16cda51547ad9d99892049340841f3e15836", [:mix], [], "hexpm", "af8daf87384b51b7e611fb1a1f2c4d4876b65ef968fa8bd3adf44cff401c7f21"},
"decorator": {:hex, :decorator, "1.4.0", "a57ac32c823ea7e4e67f5af56412d12b33274661bb7640ec7fc882f8d23ac419", [:mix], [], "hexpm", "0a07cedd9083da875c7418dea95b78361197cf2bf3211d743f6f7ce39656597f"},
"dialyxir": {:hex, :dialyxir, "1.4.4", "fb3ce8741edeaea59c9ae84d5cec75da00fa89fe401c72d6e047d11a61f65f70", [:mix], [{:erlex, ">= 0.2.7", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "cd6111e8017ccd563e65621a4d9a4a1c5cd333df30cebc7face8029cacb4eff6"},
"diskusage_logger": {:hex, :diskusage_logger, "0.2.0", "04fc48b538fe4de43153542a71ea94f623d54707d85844123baacfceedf625c3", [:mix], [], "hexpm", "e3f2aed1b0fc4590931c089a6453a4c4eb4c945912aa97bcabcc0cff7851f34d"},
Expand Down Expand Up @@ -50,7 +50,7 @@
"jason": {:hex, :jason, "1.4.4", "b9226785a9aa77b6857ca22832cffa5d5011a667207eb2a0ad56adb5db443b8a", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "c5eb0cab91f094599f94d55bc63409236a8ec69a21a67814529e8d5f6cc90b3b"},
"jsx": {:hex, :jsx, "3.1.0", "d12516baa0bb23a59bb35dccaf02a1bd08243fcbb9efe24f2d9d056ccff71268", [:rebar3], [], "hexpm", "0c5cc8fdc11b53cc25cf65ac6705ad39e54ecc56d1c22e4adb8f5a53fb9427f3"},
"kino": {:hex, :kino, "0.14.2", "46c5da03f2d62dc119ec5e1c1493f409f08998eac26015ecdfae322ffff46d76", [:mix], [{:fss, "~> 0.1.0", [hex: :fss, repo: "hexpm", optional: false]}, {:nx, "~> 0.1", [hex: :nx, repo: "hexpm", optional: true]}, {:plug, "~> 1.0", [hex: :plug, repo: "hexpm", optional: true]}, {:table, "~> 0.1.2", [hex: :table, repo: "hexpm", optional: false]}], "hexpm", "f54924dd0800ee8b291fe437f942889e90309eb3541739578476f53c1d79c968"},
"kino_live_component": {:hex, :kino_live_component, "0.0.2", "872ec328f1e740e4f6488e9e104862fc680f5148c8642a34cd435a514fd57250", [:mix], [{:bandit, "1.5.7", [hex: :bandit, repo: "hexpm", optional: false]}, {:jason, "1.4.4", [hex: :jason, repo: "hexpm", optional: false]}, {:kino, "0.14.2", [hex: :kino, repo: "hexpm", optional: false]}, {:phoenix, "1.7.14", [hex: :phoenix, repo: "hexpm", optional: false]}, {:phoenix_html, "4.1.1", [hex: :phoenix_html, repo: "hexpm", optional: false]}, {:phoenix_live_view, ">= 0.20.17", [hex: :phoenix_live_view, repo: "hexpm", optional: false]}], "hexpm", "ca9facceb3503587217e4050572f937374ec02ea90b29fefacaea31c7c30bc79"},
"kino_live_component": {:hex, :kino_live_component, "0.0.3", "fa4408bd09482fd80c4c235b602d4b6b55b23c7816684b822766e256174d7313", [:mix], [{:bandit, "1.5.7", [hex: :bandit, repo: "hexpm", optional: false]}, {:jason, "1.4.4", [hex: :jason, repo: "hexpm", optional: false]}, {:kino, "0.14.2", [hex: :kino, repo: "hexpm", optional: false]}, {:phoenix, "1.7.14", [hex: :phoenix, repo: "hexpm", optional: false]}, {:phoenix_html, "4.1.1", [hex: :phoenix_html, repo: "hexpm", optional: false]}, {:phoenix_live_view, ">= 0.20.17", [hex: :phoenix_live_view, repo: "hexpm", optional: false]}, {:plug, "1.16.1", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "a3bad8983ba42a38614b2b229b8e203d6994040ff7a0b285e4c246e1a2a58e12"},
"logster": {:hex, :logster, "1.1.1", "d6fddac540dd46adde0c894024500867fe63b0043713f842c62da5815e21db10", [:mix], [{:jason, "~> 1.1", [hex: :jason, repo: "hexpm", optional: false]}, {:plug, "~> 1.0", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "d18e852c430812ad1c9756998ebe46ec814c724e6eb551a512d7e3f8dee24cef"},
"mail": {:hex, :mail, "0.4.1", "f3928edeeafbc833319879811fc9337c453acb039f68119cc6732775aa0dea04", [:mix], [], "hexpm", "d9e69b60431084b8c88603f0d899736b46356a6ca12397b63034133d9382b92d"},
"makeup": {:hex, :makeup, "1.2.1", "e90ac1c65589ef354378def3ba19d401e739ee7ee06fb47f94c687016e3713d1", [:mix], [{:nimble_parsec, "~> 1.4", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "d36484867b0bae0fea568d10131197a4c2e47056a6fbe84922bf6ba71c8d17ce"},
Expand Down

0 comments on commit a099dc4

Please sign in to comment.