如何增加 Akka HTTP 中的 `akka.http.server.parsing.max-method-length` ?

sek*_*har 3 scala websocket akka-http

如何修复 Akka HTTP 中增加最大方法长度的问题。我在网络套接字连接服务中遇到以下问题。

\n\n
Illegal request, responding with status \'400 Bad Request\': Unsupported\n HTTP method: HTTP method too long (started with \'\xef\xbf\xbc\xef\xbe\x92\xef\xbe\xbfvN\'). Increase \n`akka.http.server.parsing.max-method-length` to support HTTP methods with more characters.\n
Run Code Online (Sandbox Code Playgroud)\n\n

我已在application.conf中添加了akka.http.server.parsing.max-method-length。\n添加max-method-length后也遇到了同样的问题,我的 .conf 文件是:

\n\n
    app {\n  interface = "0.0.0.0"\n  port = 7000\n}\n\n# Cors allowed origin configuration\n# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\ncors {\n allowed-origin = "http://127.0.0.1"\n}\n\n\nakka {\n  http {\n    server.parsing.illegal-header-warnings = off\n    client.parsing.illegal-header-warnings = off\n  }\n}\nakka.http.server.parsing.max-method-length =500\n
Run Code Online (Sandbox Code Playgroud)\n