Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors in Console when deploying or running localhost with node.js and menus don't work #41

Open
alifadda-me opened this issue Sep 22, 2020 · 5 comments

Comments

@alifadda-me
Copy link

alifadda-me commented Sep 22, 2020

I get this unsolvable error in the console and the menus don't work
Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-ZomnyosL2bmZ79LmErHEhL+1fVaBj9NngvpOK/l4qio='), or a nonce ('nonce-...') is required to enable inline execution.

Have a look at my website and see >> https://woofer-api.herokuapp.com/
GitHub >> https://github.com/silvertechguy/woofer-api/blob/master/server.js

I'm so sorry for my terrible English

@vrajcm9
Copy link

vrajcm9 commented Oct 11, 2020

You could separate the script from the .html page to a .js file that would solve the issue.

@alifadda-me
Copy link
Author

You could separate the script from the .html page to a .js file that would solve the issue.

Thanks for your response.
It's hard to do that because the file is minified in a way that can not be unminified.

@vrajcm9
Copy link

vrajcm9 commented Oct 11, 2020

There would be a starting <script> tag and ending </script>. Just copy and paste everything between them and import them as src to the script tag.

@alifadda-me
Copy link
Author

Thank you @vrajcm9
really appreciated.

@Paras-code-007
Copy link

There would be a starting <script> tag and ending </script>. Just copy and paste everything between them and import them as src to the script tag.

tried this but still not working
used defer in script tag and put that after title tag

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants