fix(portal|website): Fix static paths for website and elixir (#3802)

Phoenix VerifiedRoutes expects directories for `statics` where we were
passing filenames too.

These are removed since they're not required -- all of the top level
files we need to serve at the root don't need VerifiedRoutes.

For the website, the files were named incorrectly.


The above issues were causing 404s on both the website and portal.
This commit is contained in:
Jamil
2024-02-28 12:03:42 -08:00
committed by GitHub
parent bb4a170ca5
commit 127b97e588
8 changed files with 6 additions and 6 deletions

View File

@@ -1,5 +1,5 @@
defmodule API do
def static_paths, do: ~w(assets fonts images favicon.ico site.webmanifest robots.txt)
def static_paths, do: ~w(assets fonts images)
def router do
quote do

View File

@@ -18,7 +18,7 @@ defmodule Web do
"""
def static_paths,
do: ~w(assets fonts images .well-known favicon.ico site.webmanifest robots.txt)
do: ~w(assets fonts images .well-known)
def router do
quote do

View File

@@ -4,10 +4,10 @@
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=client-width, initial-scale=1" />
<link rel="icon" href={~p"/favicon.ico"} sizes="any" />
<link rel="icon" href="/favicon.ico" sizes="any" />
<link rel="icon" href={~p"/images/favicon.svg"} type="image/svg+xml" />
<link rel="apple-touch-icon" href={~p"/images/apple-touch-icon.png"} />
<link rel="manifest" href={~p"/site.webmanifest"} />
<link rel="manifest" href="/site.webmanifest" />
<meta name="theme-color" content="#331700" />
<meta name="csrf-token" content={get_csrf_token()} />
<.live_title suffix=" · Firezone">

View File

Before

Width:  |  Height:  |  Size: 4.1 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

View File

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

View File

Before

Width:  |  Height:  |  Size: 802 B

After

Width:  |  Height:  |  Size: 802 B

View File

@@ -3,12 +3,12 @@
"short_name": "Firezone",
"icons": [
{
"src": "/android-chrome-192x192.png",
"src": "/images/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/android-chrome-512x512.png",
"src": "/images/android-chrome-512x512.png",
"sizes": "512x512",
"type": "image/png"
}