-
-
Notifications
You must be signed in to change notification settings - Fork 33
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
Add security headers to nextjs config to prevent XSS attacks and clickjacking #4841
Comments
@geleeroyale can you check do we have some default vercel headers serving Giveth app? thx |
@kkatusic the frontend config should be located in next-config.ts and we have CORS configured on the reverse proxy to access Apart from that I think we did not set any headers. Here is the CORS config we are using:
|
@geleeroyale ok and that's ok, but look at header that you get from giveth.io and look, what extra we defined inside next.config.js file: giveth-dapps-v2/next.config.js Line 156 in 66e0051
|
Yes - It looks like its not properly configured. Please take a deeper look into this. |
@geleeroyale can you test inside preview link these security headers: https://giveth-dapps-v2-git-feat-securityheaders-givethio.vercel.app/ |
We got some reports in the past that it is possible to run a "clickjacking" attack against giveth.io
(essentially people could embed the whole site in an iframe and display it on their site, changing some links in their portal to their own)
Now this is known and has been like that for a long time without being exploited (its also quite hard to do something useful) ... regardless, we should probably fix it.
https://dev.to/theinfosecguy/how-to-protect-your-nextjs-website-from-clickjacking-2jbg
https://nextjs.org/docs/pages/building-your-application/configuring/content-security-policy
The text was updated successfully, but these errors were encountered: