Refused to load the script 'https://cdn.socket.io/4.5.4/socket.io.min.js' because it violates the following Content Security Policy directive: "script-src 'self'". Note that 'script-src-elem' was not explicitly set, so 'script
<head>
<title>Socket.IO chat</title>
<meta http-equiv="Content-Security-Policy" content="script-src-elem 'self' https://cdn.socket.io; connect-src 'self' https://cdn.socket.io;">
</head>
i did add this in the head of my html but in browser console it show me the above error.
i did also try this
<head>
<title>Socket.IO chat</title>
<meta http-equiv="Content-Security-Policy" content="script-src 'self' https://cdn.socket.io; connect-src 'self' https://cdn.socket.io;">
</head>
<!DOCTYPE html>
<html>
<head>
<title>Socket.IO chat</title>
<meta http-equiv="Content-Security-Policy" content="script-src 'self' https://cdn.socket.io http://localhost:3000;">
</head>
<body>
<ul id="messages"></ul>
<form id="form" action="">
<input id="input" autocomplete="off" /><button>Send</button>
</form>
</body>
<script src="https://cdn.socket.io/4.5.4/socket.io.min.js"</script>
</html>
here is the full html for the example of socket.io