The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
|
#1
|
|||
|
|||
Need help with vBulletin external.php integration
I've been using the external feed with type Javascript for years to embed a feed onto the front page of my site. However, things have recently changed. For security, Apache is set to include the following header:
Header set X-Content-Type-Options nosniff This works fine for Safari and Firefox, but Google Chrome now enforces strict mime types. In Chrome, it throws the following error: Refused to execute script from 'http://forum.miata.net/vb/external.php?type=js&forumids=82' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled. What other options do I have to get the feed to work in Chrome? I know I can set the feed to XML or RSS, but I don't know how to implement it in Javascript. Here's my current code: Code:
<script type="text/javascript" src="http://forum.miata.net/vb/external.php?type=js&forumids=82"></script> <script language="" type="text/javascript"> <!-- for (i = 0; i < 8; i++) { document.writeln("<p>"+threads[i].threaddate+": <b>"+threads[i].title+"</b><br> <a href=\"http://forum.miata.net/vb/showthread.php?threadid="+threads[i].threadid+"\">Read more...</a></p>"); } //--> </script> The test page works with Safari and Firefox,but not with Chrome. Any suggestions on how to get a feed to work with Chrome? --------------- Added [DATE]1474723184[/DATE] at [TIME]1474723184[/TIME] --------------- I found a temporary workaround, which is to put a <filesMatch> directive in Apache so the nosniff header doesn't get sent for external.php. Maybe this is fine as a permanent workaround, but I'd still be interested in knowing if there's a cleaner way. TIA |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|