diff --git a/archilance/urls.py b/archilance/urls.py
index c402dc2..a81eb22 100644
--- a/archilance/urls.py
+++ b/archilance/urls.py
@@ -47,10 +47,6 @@ urlpatterns = [
'message': 'Произошла ошибка при оплате',
}, name='tmp-payment-fail'),
- url(r'^robots\.txt$', TemplateView.as_view(),
- {'template': 'robots.txt', 'mimetype': 'text/plain'}
- ),
-
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
if settings.DEBUG:
diff --git a/assets/js/chat.js b/assets/js/chat.js
index 0cb86cd..e541f8d 100644
--- a/assets/js/chat.js
+++ b/assets/js/chat.js
@@ -29,7 +29,12 @@ window.confirm = function (message, callback, caption) {
var SocketHandler = function () {
domain = domain.replace(':' + port, '');
- var url = 'ws://' + domain + '/chat/' + userId + '/';
+ if (window.location.protocol == 'https:') {
+ var ws = "wss://";
+ } else {
+ var ws = "ws://";
+ }
+ var url = ws + domain + '/chat/' + userId + '/';
var sock = new WebSocket(url);
var intervalId;
sock.onopen = function () {
diff --git a/robots.txt b/robots/robots.txt
similarity index 100%
rename from robots.txt
rename to robots/robots.txt
diff --git a/templates/partials/base.html b/templates/partials/base.html
index d3d09ef..5a036e3 100644
--- a/templates/partials/base.html
+++ b/templates/partials/base.html
@@ -33,7 +33,7 @@
-
+
@@ -100,7 +100,13 @@
if ((queryString.indexOf('/chat') != 0) && (queryString.indexOf('/users/contractor-office/work-projects') != 0)) {
domain = domain.replace(':' + port, '');
- var url = 'ws://' + domain + '/chat/' + userId + '/';
+ if (window.location.protocol == 'https:') {
+ var ws = "wss://";
+ } else {
+ var ws = "ws://";
+ }
+
+ var url = ws + domain + '/chat/' + userId + '/';
var sock = new WebSocket(url);
var intervalId;
sock.onopen = function () {