错误请求 - 无效 URL HTTP 错误 400。请求 URL 无效。在 NodeJS 中对域名和 JWT 令牌使用 SSL 时

Bad Request - Invalid URL HTTP Error 400. The request URL is invalid. while using SSL on domain name and JWT token inside NodeJS

我的 URL 在从服务器获取数据时无法正常工作。我所做的如下:

  • Created the Node JS application using Bcrypt and JWT tokens in IIS server.
  • I am using the access token in URL to get the data from server after validating the User.
  • While using the accesstoken it is displaying the data correctly with http request but not with https request.

假设,我们有一个URL,它的数据是http://example.com/Users/Accesstoken(length:350)

所以这个 url 可以工作,但是如果我们用 https 替换 http 那么它会显示错误

Bad Request - Invalid URL
HTTP Error 400. The request URL is invalid.

我尝试过的如下:

  • 我试过在 IIS 中使用 maxURLlength 来获取数据,但是没有用。
  • 我在 IIS 中尝试过 maxquerystring,这也没有用。
  • 我已经尝试过我在 nodejs 应用程序中使用的端口,这在 http 中有效但在 https 中无效。
  • 现在在 IIS 配置请求过滤设置中的功能设置下增加最大 URL 长度的限制,它也显示 ssl 不安全。

    请帮助我了解如何解决这个问题,因为我需要节点 js 应用程序来调用 api,然后我需要那些 api 用于不同的应用程序,例如 asp.net, reactjs、android、ios 等

    我找到了我自己问题的答案。这是我的 nodejs 应用程序未 link 的 SSL 问题。所以在这种情况下,我在创建 HTTPS 服务器时使用了 SSL 配置,它解决了我的问题。这是 link 对 https://www.youtube.com/watch?v=USrMdBF0zcg

    的回答