apply ssl on ws if required