-
Hello. I do not know if this has already been discussed. If it has please point me to the right places I am trying to access a cowboy server on one computer(A) from another computer (B) over a local area network (my wifi). How can I do this? The connection between the computers is working fine. I tested accessing a local HTML webpage on one computer from the other and it works well. When i try to access the cowboy server it doesn't work. I get HTTP Error Code 400. The way I am accessing is as follows: in the browser on Please help. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Please open dev tools in the browser and you will get the headers sent for the request and response that you can paste here. The dispatch list would also help. |
Beta Was this translation helpful? Give feedback.
-
Snip of browser network dev toolsCowboy listener - xxx_app.erl
|
Beta Was this translation helpful? Give feedback.
That's because you specify
<<"localhost">>
as the host in your dispatch list. Doing this means only requests that haveHost: localhost
(with/without port) will succeed.To make it work you can accept any host by changing
<<"localhost">>
to'_'
.