fix viewport
This commit is contained in:
parent
656b94dd15
commit
d4a38bbf6f
8
app.py
8
app.py
@ -272,8 +272,10 @@ def serve_file(filename):
|
||||
if not os.path.isfile(full_path):
|
||||
app.logger.error(f"File not found: {full_path}")
|
||||
return "File not found", 404
|
||||
|
||||
log_file_access(full_path)
|
||||
|
||||
# Exclude HEAD requests from logging
|
||||
if request.method != 'HEAD':
|
||||
log_file_access(full_path)
|
||||
|
||||
mime, _ = mimetypes.guess_type(full_path)
|
||||
mime = mime or 'application/octet-stream'
|
||||
@ -283,12 +285,10 @@ def serve_file(filename):
|
||||
# Check cache first (using diskcache)
|
||||
cached = cache.get(filename)
|
||||
if cached:
|
||||
app.logger.info(f"Cache hit for {filename}")
|
||||
cached_file_bytes, mime = cached
|
||||
cached_file = io.BytesIO(cached_file_bytes)
|
||||
response = send_file(cached_file, mimetype=mime)
|
||||
else:
|
||||
app.logger.info(f"Cache miss for {filename}")
|
||||
if mime and mime.startswith('image/'):
|
||||
# Image processing branch (with caching)
|
||||
try:
|
||||
|
||||
@ -2,7 +2,6 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
||||
|
||||
<meta property="og:title" content="Gottesdienste Speyer und Schwegenheim" />
|
||||
<meta property="og:description" content="... uns aber, die wir gerettet werden, ist es eine Gotteskraft." />
|
||||
@ -10,7 +9,7 @@
|
||||
<meta property="og:url" content="https://app.bethaus-speyer.de" />
|
||||
|
||||
<title>Gottesdienste</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
||||
<link rel="icon" href="/static/icons/logo-192x192.png" type="image/png" sizes="192x192">
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,6 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
||||
|
||||
<meta property="og:title" content="Gottesdienste Speyer und Schwegenheim" />
|
||||
<meta property="og:description" content="... uns aber, die wir gerettet werden, ist es eine Gotteskraft." />
|
||||
@ -11,7 +10,7 @@
|
||||
<meta property="og:type" content="website" />
|
||||
|
||||
<title>Gottesdienste Speyer und Schwegenheim</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='styles.css') }}">
|
||||
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
|
||||
<style>
|
||||
|
||||
@ -2,7 +2,6 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
||||
|
||||
<meta property="og:title" content="Gottesdienste Speyer und Schwegenheim" />
|
||||
<meta property="og:description" content="... uns aber, die wir gerettet werden, ist es eine Gotteskraft." />
|
||||
@ -11,7 +10,7 @@
|
||||
<meta property="og:type" content="website" />
|
||||
|
||||
<title>Gottesdienste Speyer und Schwegenheim</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='styles.css') }}">
|
||||
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
|
||||
<style>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user