mirror of
https://github.com/darkwire/darkwire.io.git
synced 2025-07-19 19:14:53 +00:00
Eb fix (#58)
* Show http link if crypto not supported * Fix for https on EB
This commit is contained in:
parent
4358703eeb
commit
f0242b6ff4
@ -12,6 +12,10 @@ files:
|
||||
server {
|
||||
listen 8080;
|
||||
|
||||
if ($http_x_forwarded_proto != "https") {
|
||||
rewrite ^(.*)$ https://darkwire.io$REQUEST_URI permanent;
|
||||
}
|
||||
|
||||
if ($time_iso8601 ~ "^(\d{4})-(\d{2})-(\d{2})T(\d{2})") {
|
||||
set $year $1;
|
||||
set $month $2;
|
||||
@ -37,10 +41,6 @@ files:
|
||||
}
|
||||
|
||||
location / {
|
||||
if ($http_x_forwarded_proto = "http") {
|
||||
rewrite ^/(.*)$ https://darkwire.io$request_uri;
|
||||
}
|
||||
|
||||
proxy_pass http://nodejs;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
|
@ -29,6 +29,8 @@ app.set('view engine', 'mustache');
|
||||
app.set('views', __dirname + '/views');
|
||||
app.use(express.static(__dirname + '/public'));
|
||||
|
||||
app.get('/health-check', (req, res) => res.send(200));
|
||||
|
||||
function generateNewRoom(req, res, id) {
|
||||
const room = new Room(io, id);
|
||||
rooms.push(room);
|
||||
|
@ -166,6 +166,7 @@
|
||||
<div class="modal-body">
|
||||
<p>Your browser does not support the <a href="https://developer.mozilla.org/en-US/docs/Web/API/Crypto" target="_blank">Crypto Web API</a>.</p>
|
||||
<p>Try using the lastest version of Chrome, Firefox or Safari.</p>
|
||||
<p>Otherwise, you may be visiting on http procotol. Try <a href="https://darkwire.io">https://darkwire.io</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user