dockerfile builds
This commit is contained in:
@@ -280,8 +280,8 @@ func serve(cctx *cli.Context) error {
|
||||
path := c.Request().URL.Path
|
||||
maxAge := 1 * (60 * 60) // default is 1 hour
|
||||
|
||||
// all assets in /static/js, /static/css, /static/media are content-hashed and can be cached for a long time
|
||||
if strings.HasPrefix(path, "/static/js/") || strings.HasPrefix(path, "/static/css/") || strings.HasPrefix(path, "/static/media/") {
|
||||
// all assets in /static/_expo, /static/assets, /static/media are content-hashed and can be cached for a long time
|
||||
if strings.HasPrefix(path, "/static/_expo/") || strings.HasPrefix(path, "/static/assets/") || strings.HasPrefix(path, "/static/media/") {
|
||||
maxAge = 365 * (60 * 60 * 24) // 1 year
|
||||
}
|
||||
|
||||
|
||||
+4
-1
@@ -2,7 +2,10 @@ package bskyweb
|
||||
|
||||
import "embed"
|
||||
|
||||
//go:embed static/*
|
||||
// `all:` disables the default exclusion of files/dirs beginning with `_` or `.`,
|
||||
// which is needed because Metro emits chunks like `__common-...js` and
|
||||
// `__expo-metro-runtime-...js`.
|
||||
//go:embed all:static
|
||||
var StaticFS embed.FS
|
||||
|
||||
//go:embed embedr-static/*
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
<!-- Hello Humans! API docs at https://atproto.com -->
|
||||
|
||||
<link rel="preload" as="font" type="font/woff2" href="{{ staticCDNHost }}/static/media/InterVariable.2bf3d951bf9d6109437ea0874bbf12fb.woff2" crossorigin>
|
||||
<link rel="preload" as="font" type="font/woff2" href="{{ staticCDNHost }}/static/assets/assets/fonts/inter/InterVariable.2bf3d951bf9d6109437ea0874bbf12fb.woff2" crossorigin>
|
||||
|
||||
<style>
|
||||
/**
|
||||
@@ -25,14 +25,14 @@
|
||||
*/
|
||||
@font-face {
|
||||
font-family: 'InterVariable';
|
||||
src: url("{{ staticCDNHost }}/static/media/InterVariable.2bf3d951bf9d6109437ea0874bbf12fb.woff2") format('woff2');
|
||||
src: url("{{ staticCDNHost }}/static/assets/assets/fonts/inter/InterVariable.2bf3d951bf9d6109437ea0874bbf12fb.woff2") format('woff2');
|
||||
font-weight: 300 1000;
|
||||
font-style: normal;
|
||||
font-display: swap;
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'InterVariableItalic';
|
||||
src: url("{{ staticCDNHost }}/static/media/InterVariable-Italic.8d1dc86da25893737b6bb8a9c64b790e.woff2") format('woff2');
|
||||
src: url("{{ staticCDNHost }}/static/assets/assets/fonts/inter/InterVariable-Italic.8d1dc86da25893737b6bb8a9c64b790e.woff2") format('woff2');
|
||||
font-weight: 300 1000;
|
||||
font-style: italic;
|
||||
font-display: swap;
|
||||
|
||||
Reference in New Issue
Block a user