Get 2024 Templates Mega Bundle!$1000 worth of 19 Bootstrap HTML, Vue & React Templates + 3 Vector Sets for just $99
Get for 99$

Type MIME (“text/html”) discordance.


An error occur when loading .js script files from sign-in.html
Firefox console shows:

Resource “http://localhost:7060/login” was blocked due to a discordance of type MIME (“text/html”) (X-Content-Type-Options: nosniff).

<script> load fail. Source: "http://localhost:7060/assets/plugins/global/plugins.bundle.js".

-- And so on for
assets/js/scripts.bundle.js and
assets/js/custom/authentication/sign-in/general.js

Could you help me, please?


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (8)


Hi,

May I know which product and version are you using? This issue is not a common issue for HTML templates and is probably related to your backend code.

Have you encountered an issue with the original templates or in your developing code? Could you please provide more info about your server-side language?

Regards.



Hi,
Yes, Product: Metronics; Dashboard Default, Proyect Spring.
Spring version: 3.1.1
Java version: 17
Jackson databind 2.15.2 (default)
IDE Spring Tool Suite 4 version: 4.19.0
Now it works like this:
Proyect starts and show sign-in screen with no styles. Just text and no background image.
Then I sign in and navigator (Firefox Mozilla) shows al code from general.js file
(assets/js/custom/authentication/sign-in/general.js?continue)
Then I have to push the back button from navigator and shows already my sign-in screen ok with styles and background image.
But sign-in screen shows OK only after I already sign in.
Otherwise, sign-in screen shows with no styles.
In advance, thank you very much.



--- I think what's wrong...
About use of:
//return "/pages/auth/sign-in";
return theme.getPageView("auth", "sign-in");
Let me check.
Thanks.



Hi,

Function theme.getPageView only extends the page view path.

Could you please make sure that you still have auth layout decorator on your sign-in page view?


layout:decorate="~{${@theme.getView("auth")}}"


Also please check your spring-boot console for errors.

Regards,
Lauris Stepanovs,
Keenthemes Support Team



Status:
I import a new update from Themeforest spring project.
I make it works fine. (Sign-in and Menu).
I did a copy-paste from all folders and files to my project.
spring-boot-starter-parent version: 3.1.1
java version: 17
jackson version: 2.15.2
I think there is a kind of conflict between controllers from my project and controllers from demo project.
Mine always send to a http://localhost:7060/login url. Always to login (my project was function already with a loggin view to sign-in with users from a database)
I tried to split the flow to access: trying to use only demo controllers but I still get redirect to /login url.
For now, I'm working on it: find some conflict with controllers.
I'll apreciate any help or any tip.
Thank you very much.
By the way: there is no error messages on spring-boot console. Not even a warning. Just in Mozilla navigator the message: Resource http://localhost:7060/login was blocked due to a discordance of type MIME ("text/html") (X-Content-Type-Options: nosniff)" for each .js file involved on sign-in.



FIXED!
A theme of security. All those new folders from Keenthemes must be free to access at least before sign-in in order to retrieve styles.
Thanks!



Hi,

Glad to hear you fixed this. All the best with your project!

Please let us know if you have any further questions on this topic or anything else.

Regards,
Lauris Stepanovs,
Keenthemes Support Team



Thank you very much.
Best regards.


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(