-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_favicon_access.py
More file actions
67 lines (55 loc) · 1.82 KB
/
Copy pathtest_favicon_access.py
File metadata and controls
67 lines (55 loc) · 1.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#!/usr/bin/env python3
"""
Simple test script to verify favicon access.
"""
import requests
import sys
def test_favicon_access():
"""Test if favicon files are accessible via HTTP."""
base_url = "https://www.retrofy.info"
favicon_files = [
"favicon.ico",
"favicon-16x16.png",
"favicon-32x32.png",
"apple-touch-icon.png",
"android-chrome-192x192.png",
"android-chrome-512x512.png"
]
print("Testing Favicon Access")
print("=" * 50)
print(f"Base URL: {base_url}")
print()
results = []
for filename in favicon_files:
url = f"{base_url}/favicon/{filename}"
try:
response = requests.get(url, timeout=10)
if response.status_code == 200:
print(f"✅ {filename} - OK ({response.status_code})")
results.append(True)
else:
print(f"❌ {filename} - Error ({response.status_code})")
results.append(False)
except Exception as e:
print(f"❌ {filename} - Exception: {e}")
results.append(False)
print()
print("=" * 50)
print("RESULTS")
print("=" * 50)
passed = sum(results)
total = len(results)
print(f"Passed: {passed}/{total}")
if passed == total:
print("🎉 ALL FAVICONS ARE ACCESSIBLE!")
print("✅ Your favicon configuration is working correctly")
else:
print("⚠️ SOME FAVICONS ARE NOT ACCESSIBLE!")
print("Please check:")
print("1. Files exist in /srv/retrofy_images/ on your server")
print("2. Docker container is restarted")
print("3. File permissions are correct")
return passed == total
if __name__ == "__main__":
success = test_favicon_access()
sys.exit(0 if success else 1)