Parse the X-Forwarded-For header if it exists in the connection. This
will allow bans to work if the server is sitting behind an Nginx
reverse proxy (that has been configured to add the header).
Also added a safe-guard to disallow bans for localhost so you cannot
accidentally ban everybody from connecting if the server is behind a
reverse proxy.
This should resolve#49
Added the "Cache-Control" header to responses for the main.wasm file.
This should help with debugging and updates by telling the browser not
to cache the web assembly binary.
This is an icon that I threw together in a few minutes. I don't want
my avatar as the favicon for this repository.
Also, the favicon.png has moved to the root directory as it is
something that is meant to be customized along with the settings that
is also in the root.
Move the help html to a template and populate the lists dynamically.
This also splits out the base HTML stuff (eg, the <html> and <body>
tags) to a base template file.
Wrapping the connection with a mutex prevents the "concurrent write to
websocket connection" panic. The new functions are ReadData() and
WriteData so as to not collide with ReadJSON() and WriteJSON().
handlePublish, handlePlay, and handleDefault have been added in
handlers.go and removed as anonymous functions in main.go. This also
required moving some struct and variable definitions around a bit.