Answer the question
In order to leave comments, you need to log in
This request has been blocked; the content must be served over HTTPS?
How to fix the error when Sokcet.io sends an attempt to connect to the server:
Mixed Content: The page at 'https://domain.com/ru' was loaded over HTTPS,
but requested an insecure XMLHttpRequest endpoint 'http://localhost:3000/socket.io/?EIO=3&transport=polling&t=LzUGBey'. This request has been blocked;
the content must be served over HTTPS.
"use strict";
const express = require('express');
const app = express();
const path = require('path');
const server = require('http').createServer(app);
const io = require('socket.io')(server);
const port = process.env.PORT || 3000;
server.listen(port, function () {
logTime('Server listening at port: ' + port);
});
....
Answer the question
In order to leave comments, you need to log in
Document.getElementsByClassName()
Read the first half of the first sentence in the link.
If you have one element, then you can fix it, for example, like this:
If multiple:
var items = document.getElementsByClassName('gLFyf gsfi');
Array.prototype.forEach.call(items, function(item) {
item.value = '111';
});
And again documentation
https://nginx.ru/ru/docs/http/websocket.html
the content must be served over HTTPS
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question