Incognito-old icon indicating copy to clipboard operation
Incognito-old copied to clipboard

CSS and JS does not load.

Open c8hunderscore opened this issue 3 years ago • 1 comments

At first I tried to host this on my local machine and port forward, but I did not realize my chromebook blocks viewing websites directly from IP addresses, you had to use a domain name instead. Everything worked on localhost though. I decided to stick with Heroku, but when I used it, scripts and stylesheets did not load.

I did not look through the code to figure out the problem, but I'm guessing that requests to these paths are either:

  • not proxied
  • not proxied correctly (/index.js instead of /service/url/index.js)

I am happy to give more info if you need it.

c8hunderscore avatar Nov 06 '21 19:11 c8hunderscore

Same issue here. After looking at the webserver code for a bit, I found out that index.html in the pages directory didn't use any CSS at all. However, template.html had a stylesheet attached to it and looked exactly like incog.dev and its mirror sites.

A simple fix that should work for now is moving template.html to the pages folder and changing line 26 from [ '/', 'home', path.join(__dirname, 'pages', 'index.html') ], to [ '/', 'home', path.join(__dirname, 'pages', 'template.html') ],

Mokuroh64 avatar Nov 10 '21 21:11 Mokuroh64