Your initial header.tpl should work with the latest version of nodebb, app.template is no longer necessary since that is available in ajaxify.data.template
browser console errors after v1.6.0 upgrade
-
@teh_g I do admit I didn't check if it would work, you probably actually need
types { application/javascript jst js; text/css css; }
-
@julian said in browser console errors after v1.6.0 upgrade:
The
X-Content-Type-Options
response HTTP header is a marker used by the server to indicate that the MIME types advertised in theContent-Type
headers should not be changed and be followed. This allows to opt-out of MIME type sniffing, or, in other words, it is a way to say that the webmasters knew what they were doing.... :trollface: (emphasis mine)
As @pitaj issued it, we'll track its fix, but as
X-Content-Type-Options
is not likely to be used extensively, there's no need to prioritise this issue for backport intov1.6.x
. However when resolved, you can easily cherry-pick the fix into your existing installation.Totally understand
I'm super paranoid and like following the theoretical best practices, but as you can see by the content security policy in my nginx config, it isn't always possible. Stupid real world not lining up with my perfect world expectations!
@pitaj said in browser console errors after v1.6.0 upgrade:
@teh_g I do admit I didn't check if it would work, you probably actually need
types { application/javascript jst js; text/css css; }
This mostly works now. The admin page still had some issues, but at least the user section is good! I will keep strict checking disabled for the time being
-
@teh_g what are the admin issues?
-
@pitaj said in browser console errors after v1.6.0 upgrade:
@teh_g what are the admin issues?
I didn't capture the browser console log, but it was more of the MIME type errors. If you don't have a test server where you can toggle on nosniff again, I can capture the errors again later. I don't want to break my forums anymore
Having the nosniff option disabled fixes it, but I'd definitely love to keep that enabled. It protects against a few malicious attacks that could potentially occur. Though they are unlikely.
-
Issue confirmed - good catch.
As far as I can see nginx doesn't touch the headers (if not explicitly told to do so) as it's just proxying stuff...
Update:
Got around the issue using:
location ~ \.jst { add_header Content-Type application/javascript; proxy_pass http://board; }
Not nice, but for now it's a solution I am able to live with on that vhost even with
nginx.conf having setadd_header X-Content-Type-Options nosniff;
-
I observed the same after updating my board to v1.6.0, yesterday. I decided to cherry pick commit https://github.com/NodeBB/NodeBB/commit/dc87d7fc0f86d282553e40ba0f50d1bd4de9c3c1
This solved the issue!
@PitaJ: Thanks for providing this commit!
-
only chrome creating issue other browser working fine please guide?
-
@zaasmi
Right Top Profile, chat, notification not working
also not working on Nobebb Community these areas. -
@zaasmi are you seeing any errors in the browser developer tools console?
-