Giter Site home page Giter Site logo

Comments (7)

missuo avatar missuo commented on July 18, 2024 1

Fixed in e15e63b

Compatible with requests using JSON and form data in 90d4d44

from deeplx.

missuo avatar missuo commented on July 18, 2024

请注意 authkeytoken 在 DeepLX 中不是一个东西!

在 DeepLX 中 authkey 是当免费的 API 用到 IP 被封之后,才会透过 authkey 使用官方的付费 API。所以 authkey 在大部分情况下不是必须的参数。

Bearer 中的 token 可以理解为 accesstoken 仅仅只是为了保护您公开的 API 不被滥用。

所以,在你没有设置 accesstoken 的情况下,可以直接无视 Authorization,请求 /v2/* 相关的 API。

from deeplx.

missuo avatar missuo commented on July 18, 2024

当然,我可以将 Authorization 用来验证 accesstoken,但是在这种情况下,会丢弃掉 authkey 的传递,如果频繁使用出现 429 之后,您将无法继续使用翻译服务。

我不确定用户更想要的是在和官方一致的 Authorization 中传递 authkey 还是 accesstoken

from deeplx.

tisfeng avatar tisfeng commented on July 18, 2024

请注意 authkey 和 token 在 DeepLX 中不是一个东西!

我明白这一点,我部署服务时设置的是 token,我的 authkey 已经被官方封掉了。。。我觉得,大部分需要 DeepLX 服务的用户应该都是没办法通过正规渠道获取官方 authkey 😥

from deeplx.

missuo avatar missuo commented on July 18, 2024

请注意 authkey 和 token 在 DeepLX 中不是一个东西!

我明白这一点,我部署服务时设置的是 token,我的 authkey 已经被官方封掉了。。。我觉得,大部分需要 DeepLX 服务的用户应该都是没办法通过正规渠道获取官方 authkey 😥

OK,晚些时候我改下代码,支持对 accesstoken 的验证。

from deeplx.

tisfeng avatar tisfeng commented on July 18, 2024

我不确定用户更想要的是在和官方一致的 Authorization 中传递 authkey 还是 accesstoken。

如果是考虑到这一点,那我觉得可以通过判断 Authorization 的值来决定,因为官方的 key 都是以 :fx 结尾。

另外,也可以在 DeepLX 部署文档中说明一下这一点,提示用户不要将 token 设置的和官方 auth_key 格式一样,避免问题。

from deeplx.

tisfeng avatar tisfeng commented on July 18, 2024

Great ❤️

from deeplx.

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.