GithubHelp home page GithubHelp logo

Comments (9)

rahulsain avatar rahulsain commented on June 10, 2024 1

Upload your code to a GitHub repo and share the link here. It will be much easier to debug :)

https://github.com/rahulsain/backend

will send you collab access, file is in frontend folder, npm version 14.0.0

from masterportfolio.

dhruvkrishnavaid avatar dhruvkrishnavaid commented on June 10, 2024

Install and save cors: npm i cors
Then import it and use it in main file: app.use(cors())

from masterportfolio.

rahulsain avatar rahulsain commented on June 10, 2024

Install and save cors: npm i cors Then import it and use it in main file: app.use(cors())

// enabling CORS for all requests
app.use(cors());

already using it

from masterportfolio.

dhruvkrishnavaid avatar dhruvkrishnavaid commented on June 10, 2024

In the index.html, try this:

<meta http-equiv="Content-Security-Policy" content="default-src 'self'; img-src *;"

from masterportfolio.

rahulsain avatar rahulsain commented on June 10, 2024

still not resolved using
<meta http-equiv="Content-Security-Policy" content="default-src * data: blob: 'unsafe-inline' 'unsafe-eval'; img-src 'self' data: blob: 'unsafe-inline' 'unsafe-eval' https://avatars.githubusercontent.com/; script-src 'self' data: blob: 'unsafe-inline' 'unsafe-eval' https://pagead2.googlesyndication.com/; style-src * data: blob: 'unsafe-inline' 'unsafe-eval';">

from masterportfolio.

dhruvkrishnavaid avatar dhruvkrishnavaid commented on June 10, 2024

Upload your code to a GitHub repo and share the link here. It will be much easier to debug :)

from masterportfolio.

dhruvkrishnavaid avatar dhruvkrishnavaid commented on June 10, 2024

still not resolved using
<meta http-equiv="Content-Security-Policy" content="default-src * data: blob: 'unsafe-inline' 'unsafe-eval'; img-src 'self' data: blob: 'unsafe-inline' 'unsafe-eval' https://avatars.githubusercontent.com/; script-src 'self' data: blob: 'unsafe-inline' 'unsafe-eval' https://pagead2.googlesyndication.com/; style-src * data: blob: 'unsafe-inline' 'unsafe-eval';">

Just a random guess. Putting the 'self' source at the last might work?

Screenshot_20230716_142936_Chrome.jpg

As in the screenshot attached, the browser is not able to detect any other sources of img-src and script-src, putting the URIs before 'self' might work.

You may use this tool to evaluate your CSP.

from masterportfolio.

rahulsain avatar rahulsain commented on June 10, 2024

same issue

https://algodextrous.me/#/opensource

from masterportfolio.

dhruvkrishnavaid avatar dhruvkrishnavaid commented on June 10, 2024

@rahulsain, I have tried it on my codespace, and its working like a charm.
Screenshot from 2023-07-20 16-54-25

After a bit of tweaking, I've found that the problem is actually with the build process of your repository. It does not build the frontend, that's why the changes in the index.html file are not being shown.

You may add a Github action that is triggered on push to main which includes the following commands:

cd frontend
npm ci
npm run build --if-present

It will prepare a fresh build of the frontend on each push, ensuring that the latest changes are being reflected.

If you'd like to test it on your machine then just cd frontend and npm start to take a quick look at the final result.

You should close this issue now as this is not related to the project.

from masterportfolio.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.