Skip to content

Commit a060ed0

Browse files
fix :字體改為透過由google cdn載入
1 parent b31143d commit a060ed0

12 files changed

Lines changed: 9 additions & 106 deletions

app/__init__.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ def create_app():
2727
app.config['SESSION_COOKIE_SAMESITE'] = 'Lax'
2828
app.config['SESSION_COOKIE_SECURE'] = True
2929
app.config['SESSION_COOKIE_HTTPONLY'] = True
30-
app.config['SESSION_COOKIE_PATH'] = '/api'
3130

3231
redis_url = os.environ.get('REDIS_URL', 'redis://127.0.0.1:6379/0')
3332
redis_client = redis.from_url(redis_url)
@@ -71,15 +70,4 @@ def create_app():
7170
app.register_blueprint(share_bp)
7271
app.register_blueprint(system_bp)
7372

74-
@app.after_request
75-
def add_cache_headers(response):
76-
from flask import request
77-
static_extensions = ('.woff2', '.png', '.jpg', '.jpeg', '.gif', '.ico', '.svg', '.webmanifest')
78-
79-
if request.path.startswith(('/fonts/', '/dist/', '/assets/')) or request.path.endswith(static_extensions):
80-
response.headers['Cache-Control'] = 'public, max-age=31536000, immutable'
81-
if 'Set-Cookie' in response.headers:
82-
del response.headers['Set-Cookie']
83-
return response
84-
8573
return app
-3.7 MB
Binary file not shown.

public/fonts/NotoSansTC-Bold.woff2

-2.84 MB
Binary file not shown.
-2.81 MB
Binary file not shown.
-2.76 MB
Binary file not shown.
-2.81 MB
Binary file not shown.

public/fonts/Roboto-Bold.woff2

-69.3 KB
Binary file not shown.

public/fonts/Roboto-Medium.woff2

-69 KB
Binary file not shown.

public/fonts/Roboto-Regular.woff2

-67.4 KB
Binary file not shown.

public/fonts/Roboto-SemiBold.woff2

-69 KB
Binary file not shown.

0 commit comments

Comments
 (0)