-
Notifications
You must be signed in to change notification settings - Fork 237
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
net::ERR_CERT_COMMON_NAME_INVALID with IP Address #13
Comments
In what type of application are you trying to make this work? Is it a Node.js server or a web app using Vue/React or something else? Please share a screenshot or the code for the file where you're including the certificate as well. |
In a Python Flask server. from flask_socketio import SocketIO
app = Flask(__name__)
socketio = SocketIO(app, cors_allowed_origins="*")
if __name__ == '__main__':
cwd = Path(__file__).resolve().parent.as_posix()
socketio.run(app, host="0.0.0.0", ssl_context=(f'{cwd}/certs/trusted-openssl/server.crt', f'{cwd}/certs/trusted-openssl/server.key')) |
Sorry, I'm not at all familiar with Python or Flask because of which I'm unable to determine whether this is caused by the certificate or the application. I'll keep this issue open in case anyone else wants to help! |
Thanks @dakshshah96 . I created a node.js server and tried to access the site with my ip address and didn't find the green lock in address bar like yours in README. Do you see any problems with cert generation or application below? var path = require('path')
var fs = require('fs')
var express = require('express')
var https = require('https')
var certOptions = {
key: fs.readFileSync(path.resolve('server.key')),
cert: fs.readFileSync(path.resolve('server.crt'))
}
var app = express()
app.get('/', (req, res) => res.send('Hello World!'))
var server = https.createServer(certOptions, app).listen(443) |
Instead of:
Could you try:
|
I've solve it with this suggestion webpack/webpack-dev-server#416 (comment)
|
Hi Daksh,
Thanks for sharing this resource!
How can I make this work with my local IP address, 192.168.0.5 instead of localhost?
I updated
server.csr.cnf
toand
v3.ext
tobut Chrome throws
GET https://192.168.0.5:5000/socket.io/?EIO=3&transport=polling&t=NDh899k net::ERR_CERT_COMMON_NAME_INVALID
Any help on what I'm missing here :)
The text was updated successfully, but these errors were encountered: