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