Giter Club home page Giter Club logo

Comments (6)

xqdoo00o avatar xqdoo00o commented on July 18, 2024

你的basic_auth配置 放到单html配置里看能生效吗
location / {这里,
然后打开网页,输入账号密码能正常进去吗

from chatgpt-web.

eureka6 avatar eureka6 commented on July 18, 2024

你的basic_auth配置 放到单html配置里看能生效吗 location / {这里, 然后打开网页,输入账号密码能正常进去吗

这样的话,可以正常使用。

如果把basic_auth放到最外边,或者location ^~ /v1 {下面,就会报错:API密钥错误或失效,请检查API密钥!

from chatgpt-web.

xqdoo00o avatar xqdoo00o commented on July 18, 2024

放到location ^~ /v1 {
里就不能用了吗

from chatgpt-web.

eureka6 avatar eureka6 commented on July 18, 2024

是的

from chatgpt-web.

xqdoo00o avatar xqdoo00o commented on July 18, 2024

是的

我知道了。basic_auth也占用Authorization头,如果你不在前端设置api密钥使用的话,proxy_set_header Authorization 这后面改回之前的那个默认密钥。map可以不要
并且把代码里的credentials: "omit"都删掉

from chatgpt-web.

xqdoo00o avatar xqdoo00o commented on July 18, 2024

可以参考最新文档加密HTML使用

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.