Skip to content

armgit / kaneo

Public Imported from GitHub
0

⚡ Project management that doesn't become the project. Boards, Gantt charts, and GitHub integration. Self-host it or use Kaneo Cloud.

1.6 KB
Raw Blame
server {
    listen 5173;
    server_name localhost;

    # Allow larger OAuth/Better Auth session cookies in request headers.
    client_header_buffer_size 8k;
    large_client_header_buffers 4 32k;

    # Security headers
    add_header X-Content-Type-Options "nosniff" always;
    add_header X-Frame-Options "SAMEORIGIN" always;
    add_header X-XSS-Protection "1; mode=block" always;
    add_header Referrer-Policy "strict-origin-when-cross-origin" always;

    # Enable gzip compression
    gzip on;
    gzip_vary on;
    gzip_min_length 1000;
    gzip_proxied any;
    gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
    gzip_comp_level 6;

    location = /.well-known/oauth-protected-resource/api/mcp {
        default_type application/json;
        alias /var/lib/kaneo/html/mcp-oauth-resource.json;
    }

    location = /.well-known/oauth-authorization-server/api {
        default_type application/json;
        alias /var/lib/kaneo/html/mcp-oauth-authorization.json;
    }

    location /.well-known/ {
        return 404;
    }

    # Root location
    # Defense in depth if a build leaves a source map in the static directory.
    location ~* \.map$ {
        return 404;
    }

    location / {
        root /var/lib/kaneo/html;
        index index.html;
        try_files $uri $uri/ /index.html;
    }

    # Cache static assets
    # location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ {
    #     root /var/lib/kaneo/html;
    #     expires 30d;
    #     add_header Cache-Control "public, max-age=2592000";
    #     access_log off;
    # }
}