Lissy93 / web-check

🕵️‍♂️ All-in-one OSINT tool for analysing any website
https://web-check.xyz
MIT License
21.97k stars 1.67k forks source link

Refetching data not working #68

Open Techs4gnu opened 10 months ago

Techs4gnu commented 10 months ago

Deployed the web check on https://webcheck.mydevelopmentpro.com. But the results generated are not available when trying to refresh the page.

What could be the issue?

Lissy93 commented 9 months ago

Hey @Techs4gnu

Because it's a SPA. So to fix your issue, you basically just need to tell your web server to handle 404 errors by responding with a 200 and serving up index.html. (Don't worry, all 404 and client error will be handled by web-check already)

Lissy93 commented 9 months ago

If you could let me know what web server your using, and I can help you update your config file. But here's how I've gotten similar things working with various web servers and static hosting providers....

Netlify

[[redirects]]
  from = "/*"
  to = "/index.html"
  status = 200  

Vercel

{
    "rewrites": [
        { "source": "/(.*)", "destination": "/index.html" }
    ]
}

Caddy

location / {
    try_files $uri /index.html;
}

Lighttpd

url.rewrite-if-not-file = ("(.*)" => "/index.html")

Traefik

http:
  middlewares:
    spa-rewrite:
      replacePathRegex:
        regex: "^/.+"
        replacement: "/index.html"

Apache

FallbackResource /index.html

.httaccess

(it's been a while since I've written one of these, so double-check it before running!)

RewriteEngine On
RewriteBase /
RewriteRule ^index\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.html [L]

LightSpeed

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.html [L]