Giter Club home page Giter Club logo

Comments (3)

xqdoo00o avatar xqdoo00o commented on July 18, 2024

前提是你先搞好HTTPS,HTTP怎么加密码都是不安全的。

  1. Nginx自带的basic_auth,给反代接口的location里加上就好,访问html也要密码的话,location里也可加上。不过这里有个坑,auth_basic_user_file文件要放到nginx有读写权限的目录下,最好就是放html的目录下。
  2. Caddy的话,自带应该也有类似的basic_auth模块,不过我没用过。

from chatgpt-web.

xqdoo00o avatar xqdoo00o commented on July 18, 2024

再麻烦问一下大佬,api key要怎样加到html文件里去呀?(就是不再需要访客输入api_key)我搞不太明白。

你搜一下html里的headers定义,改成{"Content-Type": "application/json","Authorization": "Bearer 你的key"}

from chatgpt-web.

eureka6 avatar eureka6 commented on July 18, 2024

大佬牛逼!搭建成功了

from chatgpt-web.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.