Websocket connection failing : a solution ?
Hi,
Just to trace that I posted a solution for Websocket connection with weird port on domain. See #149 (closed)
Seem simple to correct with a little help of documentation.
I'm not sure if I have to open an new one or update a closed issue.
- add in documentation that with non standard port, set a fixed_domain in lufi.conf : mydomain:8443
- update themes/default/templates/partial/index.js.ep
Replace :
var ws_url = '<%= url_for('upload')->to_abs() %>';
% if (defined($self->config('fixed_domain')) && $self->config('fixed_domain')) {
var baseURL = '<%= url_for('/')->host($self->config('fixed_domain'))->to_abs() %>';
var actionURL = '<%= url_for('/')->host($self->config('fixed_domain'))->to_abs() %>';
% } else {
var baseURL = '<%= url_for('/')->to_abs() %>';
% }
var actionURL = '<%= url_for('/')->to_abs() %>';
with :
% if (defined($self->config('fixed_domain')) && $self->config('fixed_domain')) {
var baseURL = '<%= url_for('/')->host($self->config('fixed_domain'))->to_abs() %>';
var ws_url = '<%= url_for('upload')->host($self->config('fixed_domain'))->to_abs() %>';
var actionURL = '<%= url_for('/')->host($self->config('fixed_domain'))->to_abs() %>';
% } else {
var ws_url = '<%= url_for('upload')->to_abs() %>';
var actionURL = '<%= url_for('/')->to_abs() %>';
var baseURL = '<%= url_for('/')->to_abs() %>';
% }
I'm not sure that answering to a closed issue is a good idea...
Edited by pleutres