This commit is contained in:
2025-06-26 19:06:32 +00:00
parent 78212cc2a9
commit 7908feebf3
9 changed files with 656 additions and 1676 deletions

View File

@@ -2,14 +2,25 @@ server {
listen 80;
server_name localhost;
root /static-files;
# Serve static files
location / {
try_files $uri $uri/ =404;
# Add CORS headers for all requests
add_header Access-Control-Allow-Origin "*" always;
add_header Access-Control-Allow-Methods "GET, POST, OPTIONS" always;
add_header Access-Control-Allow-Headers "Origin, Content-Type, Accept, Authorization" always;
# Handle preflight requests
if ($request_method = 'OPTIONS') {
return 204;
}
# Set proper content type for markdown files
location ~* \.md$ {
add_header Content-Type "text/markdown; charset=utf-8";
# CORS headers are inherited from parent location
}
}
}