Welcome

首页 / 人工智能 / Ollama+Nginx配置Api Key

Ollama+Nginx配置Api Key进行授权访问
    set $auth_header $http_authorization;
    if ($auth_header != "Bearer API_KEY") {  # 替换为你的认证令牌
        return 401;  # 如果认证失败,返回 401 Unauthorized
    }