mirror of
https://github.com/philomena-dev/philomena.git
synced 2025-03-06 11:01:27 +01:00
Fold both functions into a single vite_hmr?
This commit is contained in:
parent
3296bc0a91
commit
e795dfc7cd
1 changed files with 1 additions and 5 deletions
|
@ -71,14 +71,10 @@ defmodule PhilomenaWeb.ContentSecurityPolicyPlug do
|
|||
# you use to test the frontend on a mobile device connected via a local Wi-Fi.
|
||||
vite_hmr? do
|
||||
defp default_script_src(host), do: "'self' #{host}:5173"
|
||||
else
|
||||
defp default_script_src(_host), do: "'self'"
|
||||
end
|
||||
|
||||
vite_hmr? do
|
||||
defp default_connect_src(host), do: "'self' #{host}:5173 ws://#{host}:5173"
|
||||
else
|
||||
defp default_connect_src(_host), do: "'self'"
|
||||
defp default_script_src(_host), do: "'self'"
|
||||
end
|
||||
|
||||
defp default_style_src, do: vite_hmr?(do: "'self' 'unsafe-inline'", else: "'self'")
|
||||
|
|
Loading…
Add table
Reference in a new issue