SM
Size: a a a
SM
D
AD
SM
AD
SM
D
D
D
{:error, %WebSockex.RequestError{code: 403, message: "Forbidden"}}
SM
{:error, %WebSockex.RequestError{code: 403, message: "Forbidden"}}
SM
AD
{:error, %WebSockex.RequestError{code: 403, message: "Forbidden"}}
config :app, AppWeb.Endpoint,
…
check_origin: [] - тут либо false либо добавить localhost:4100
D
config :app, AppWeb.Endpoint,
…
check_origin: [] - тут либо false либо добавить localhost:4100
config :rumbl, RumblWeb.Endpoint,
http: [port: 4000],
debug_errors: true,
code_reloader: false,
check_origin: false,
watchers: []
config :rumbl, RumblProxy.Endpoint,
http: [port: 4100],
debug_errors: true,
code_reloader: false,
check_origin: false,
watchers: []
D
[debug] new websocket request #Reference<0.4170421287.3608936454.143865>: %{bindings: %{}, body_length: 0, cert: :undefined, has_body: false, headers: %{"accept-encoding" => "gzip, deflate", "accept-language" => "en-GB,en-US;q=0.9,en;q=0.8", "cache-control" => "no-cache", "connection" => "Upgrade", "cookie" => "_rumbl_key=SFMyNTY.g3QAAAACbQAAAAtfY3NyZl90b2tlbm0AAAAYeFJCZGZqWnZCM2NNTlNBelZvVW1yOTJabQAAAAd1c2VyX2lkYQI.F-9fWc2blc37iERfyMzAa80fZ3QBEmfOQ1m0nkdmtSo", "host" => "192.168.1.66:4100", "origin" => "http://192.168.1.66:4100", "pragma" => "no-cache", "sec-websocket-extensions" => "permessage-deflate; client_max_window_bits", "sec-websocket-key" => "yDE5edVF+GTV4IOl1v3NfQ==", "sec-websocket-version" => "13", "upgrade" => "websocket", "user-agent" => "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.134 Safari/537.36 Vivaldi/2.5.1525.40"}, host: "192.168.1.66", host_info: :undefined, method: "GET", path: "/socket/websocket", path_info: :undefined, peer: {{192, 168, 1, 66}, 51865}, pid: #PID<0.1428.0>, port: 4100, qs: "token=SFMyNTY.g3QAAAACZAAEZGF0YWECZAAGc2lnbmVkbgYAZgYVumwB.Tn8AZeJEPOV034jjk1M56fUOWgd0DYq3MqFrWYX4JCE&vsn=2.0.0", ref: RumblProxy.Endpoint.HTTP, scheme: "http", sock: {{192, 168, 1, 66}, 4100}, streamid: 1, version: :"HTTP/1.1"}
[info] REFUSED CONNECTION TO RumblWeb.UserSocket in 161µs
Transport: :websocket
Serializer: Phoenix.Socket.V1.JSONSerializer
Connect Info: %{}
Parameters: %{}
[debug] websocket #Reference<0.4170421287.3608936454.143865> terminated: %{host: "192.168.1.66", method: "GET", path: "/socket/websocket", peer: {{192, 168, 1, 66}, 51865}, port: 4100, qs: "token=SFMyNTY.g3QAAAACZAAEZGF0YWECZAAGc2lnbmVkbgYAZgYVumwB.Tn8AZeJEPOV034jjk1M56fUOWgd0DYq3MqFrWYX4JCE&vsn=2.0.0", scheme: "http", version: :"HTTP/1.1"}
reason: {:crash, :error, {:badmatch, {:error, %WebSockex.RequestError{code: 403, message: "Forbidden"}}}}
[error] Ranch listener RumblProxy.Endpoint.HTTP had connection process started with :cowboy_clear:start_link/4 at #PID<0.1428.0> exit with reason: {{:badmatch, {:error, %WebSockex.RequestError{code: 403, message: "Forbidden"}}}, [{RumblProxy.WSReverseProxy, :websocket_init, 1, [file: 'lib/rumbl_proxy/ws_reverse_proxy.ex', line: 64]}, {:cowboy_websocket, :handler_call, 6, [file: '/Users/owl/Dev/rumbl/deps/cowboy/src/cowboy_websocket.erl', line: 470]}, {:cowboy_http, :loop, 2, [file: '/Users/owl/Dev/rumbl/deps/cowboy/src/cowboy_http.erl', line: 233]}, {:proc_lib, :init_p_do_apply, 3, [file: 'proc_lib.erl', line: 249]}]}
D
def websocket_endpoint(_req, _opts) do
"http://localhost:4000"
|> sub_scheme()
|> URI.merge("/socket/websocket")
end
D
SM
D