titaniumnetwork-dev / Incognito-old

Access the world wide web with Incognito, a fast and rather fancy proxy service. Enjoy a more private internet session without ads.
https://incog.dev
80 stars 1.82k forks source link

CSS and JS does not load. #9

Open c8hunderscore opened 2 years ago

c8hunderscore commented 2 years ago

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:

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

Mokuroh64 commented 2 years ago

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') ],