Git Product home page Git Product logo

Comments (15)

eallion avatar eallion commented on June 14, 2024

请问豆瓣的api怎么设置?

修改这个文件中的设置 https://github.com/eallion/memos.top/blob/main/assets/js/main.js#L218

from memos.top.

sexyfeifan avatar sexyfeifan commented on June 14, 2024



这样应该没错吧? 如果这样是正确的话还是不生效,还需要检查哪里,尝试换过设备登录查看和浏览器无痕模式查看。

api是自建的,docker里 DOUBAN_COOKIE 也已经登录了。

from memos.top.

eallion avatar eallion commented on June 14, 2024

https://github.com/eallion/memos.top/blob/main/assets/js/main.js#L208
这一行取消注释

from memos.top.

sexyfeifan avatar sexyfeifan commented on June 14, 2024

不好意思又来打扰,还是不行。

按照要求已经取消注释,自建的豆瓣api访问正常

from memos.top.

eallion avatar eallion commented on June 14, 2024

错误提示是什么?会不会是没有跨域权限。

from memos.top.

sexyfeifan avatar sexyfeifan commented on June 14, 2024

错误提示是什么?会不会没有超越权限。

这个就不太懂了,算了..

from memos.top.

ihavenoideaa avatar ihavenoideaa commented on June 14, 2024

错误提示是什么?会不会是没有跨域权限。

没有跨域权限要如何解决?

from memos.top.

eallion avatar eallion commented on June 14, 2024

没有跨域权限要如何解决?

比如有防盗链或访问限制的设置,需要把域名加入到白名单。

from memos.top.

ihavenoideaa avatar ihavenoideaa commented on June 14, 2024

具体如何操作?api是docker部署的,那是在豆瓣api的容器里面操作吗

from memos.top.

eallion avatar eallion commented on June 14, 2024

具体如何操作?api是docker部署的,那是在豆瓣api的容器里面操作吗

如果没有特别设置过,那默认就是可用的。再看看是不是其他的问题。

from memos.top.

ihavenoideaa avatar ihavenoideaa commented on June 14, 2024

网页F12提示的错误:

Access to fetch at 'https://xxx.xxapi.com/movies/34953719' from origin 'null' has been blocked by CORS policy: 
No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs,
set the request's mode to 'no-cors' to fetch the resource with CORS disabled

api在其他地方是可以正常使用的,并没有特别设置过。

from memos.top.

eallion avatar eallion commented on June 14, 2024

有没有实际api可以去看看。

from memos.top.

eallion avatar eallion commented on June 14, 2024

api在其他地方是可以正常使用的,并没有特别设置过。

勾选 允许空 Referer 字段访问 类似的设置试试看。

from memos.top.

eallion avatar eallion commented on June 14, 2024

Nginx 反代添加 add_header Access-Control-Allow-Origin *; 试试。

from memos.top.

ihavenoideaa avatar ihavenoideaa commented on June 14, 2024

Nginx 反代添加 add_header Access-Control-Allow-Origin *; 试试。

谢谢,问题解决了

from memos.top.

Related Issues (16)

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.