[ARCHIVED] LTI cant include jquery or js files

Jump to solution
jbh185
Community Member

I have an LTI working. It is written as a java spring app with https. I can successfully access the course information using the request object and call the CANVAS API and return course information. I am trying to include in my launch jsp file jquery, javascript and css files. I have tried several variations for the "src" values below but still get the console errors.

<script language="JavaScript" type="text/javascript" src="${pageContext.request.contextPath}/js/jquery-3.5.1.min.js"> </script>
<script language="JavaScript" type="text/javascript" src="${pageContext.request.contextPath}/js/gradesToBanner.js"> </script>

I am getting these errors in the Developer Console of the browser:

Strict-Transport-Security: The connection to the site is untrustworthy, so the specified header was ignored

Invalid X-Frame-Options header was found when loading “https://localhost:8443/lti-grades-to-banner/launch”: “ALLOW-FROM https://msstate.test.instructure.com” is not a valid directive.

Strict-Transport-Security: The connection to the site is untrustworthy, so the specified header was ignored.
 
The resource from “https://localhost:8443/lti-grades-to-banner/js/jquery-3.5.1.min.js” was blocked due to MIME type (“application/json”) mismatch (X-Content-Type-Options: nosniff).
 
Loading failed for the <script> with source “https://localhost:8443/lti-grades-to-banner/js/jquery-3.5.1.min.js”.
 
Strict-Transport-Security: The connection to the site is untrustworthy, so the specified header was ignored.
 
The resource from “https://localhost:8443/lti-grades-to-banner/js/gradesToBanner.js” was blocked due to MIME type (“application/json”) mismatch (X-Content-Type-Options: nosniff).
 
Loading failed for the <script> with source “https://localhost:8443/lti-grades-to-banner/js/gradesToBanner.js
 

Uncaught ReferenceError: jQuery is not defined <anonymous> https://localhost:8443/lti-grades-to-banner/launch:98

 

Any help would be greatly appreciated.

Thanks, Jerry Howell

Labels (2)
1 Solution
jbh185
Community Member
Author

Thanks bbennett2. I found the solution. It was not a cross site browser restriction but a project setup problem.

View solution in original post

0 Likes