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

Refused to execute script #4

Closed
alex289 opened this issue Oct 26, 2022 · 12 comments
Closed

Refused to execute script #4

alex289 opened this issue Oct 26, 2022 · 12 comments

Comments

@alex289
Copy link

alex289 commented Oct 26, 2022

I just added this to my site but when I visit it this error gets logged:
Refused to execute script from 'https://alexanderkonietzko-84q9dz1ke-alex289.vercel.app/va/script.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.

Does this happen because I have X-Content-Type-Options: nosniff enabled?

Here is my repo for more information

@chriswdmr
Copy link
Member

Thanks for reaching out!
It seems like you haven't redeployed after you enabled the feature on the Vercel dashboard.

Please make sure you:

  1. Enable the feature on the Vercel dashboard
  2. Install the package based on the instructions
  3. Redeploy your app

Once you redeployed after enabling the feature, the route /va/script.js will become available on your deployment

@alex289
Copy link
Author

alex289 commented Oct 26, 2022

I redeployed but still the same error

@ghoshnirmalya
Copy link

@chriswdmr I'm getting the same error even after deployment. I'm using the following versions:

"@vercel/analytics": "0.1.3",
"next": "12.1.4",

Can you please re-open this issue?

@alex289
Copy link
Author

alex289 commented Nov 3, 2022

@chriswdmr I'm getting the same error even after deployment. I'm using the following versions:

"@vercel/analytics": "0.1.3",
"next": "12.1.4",

Can you please re-open this issue?

I still have this error too but I don’t have the permission to reopen it sorry

@dglsparsons dglsparsons reopened this Nov 3, 2022
@tobiaslins
Copy link
Collaborator

@ghoshnirmalya can you please share a deployment URL with us? When was your last redeployment?

@alex289 I see your production deployment already exposes https://alexanderkonietzko.vercel.app/va/script.js for you, so resolved?

@alex289
Copy link
Author

alex289 commented Nov 4, 2022

I did not check if it was resolved after this but if it is I can say it's resolved for me

@ghoshnirmalya
Copy link

@tobiaslins You can check out https://rapidapi.com/guides/categories/graphql. The last deployment was 4 days ago.

@tobiaslins
Copy link
Collaborator

@ghoshnirmalya I can't see the deployment url (vercel.sh) easily because the /guides thing is proxied right?
Can you just try redeploying and see if it works? If not please send me the deployment url (ending with .vercel.sh)
Thanks :)

@tobiaslins
Copy link
Collaborator

@ghoshnirmalya I just found out that you're proxying the Next.js app and the root is not rapidapi.com but rapidapi.com/guides right?

@ghoshnirmalya
Copy link

@tobiaslins That is correct.

@tobiaslins
Copy link
Collaborator

@ghoshnirmalya Can you tell us more on your proxy setup? It seems like (https://rapidapi.com/guides/va/script.js) is also not available. Could you please send us a deployment url (ending with .vercel.sh)? Thanks!

@ghoshnirmalya
Copy link

@tobiaslins You can use https://devrel-stack-guides.vercel.app/guides.

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

5 participants