StanGirard / seo-audits-toolkit

SEO & Security Audit for Websites. Lighthouse & Security Headers crawler, Sitemap/Keywords/Images Extractor, Summarizer, etc ...
633 stars 130 forks source link

network error on login page. Firefox. #81

Open nunavailabul opened 1 year ago

nunavailabul commented 1 year ago

I have since gotten then dashboard to show by using either edge or chrome, after find the reason in the dev console for Firefox:

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://localhost:8000/dj-rest-auth/login/. (Reason: CORS request did not succeed). Status code: (null).

anoduck commented 1 year ago

@nunavailabul Receiving the same error, regardless of using the variable CORS_ALLOW_ALL_ORIGINS: "True" in the docker-compose file.

Tried on both firefox and chrome. OS: Kali Linux

bocklucas commented 2 weeks ago

Encountered the same issue, I'm running this on a diff machine at 192.168.x.y and its trying to hit localhost:8000 which is wrong, it should be trying to hit 192.168.x.y:8000. Looking into where to change this

bocklucas commented 2 weeks ago

Found the problem, hardcoded value at seo-audits-toolkit/admin/src/authProvider.js,

  login: ({ username, password }) =>  {
        const request = new Request('http://localhost:8000/dj-rest-auth/login/', {
           ...

@StanGirard are you able to update this?

bocklucas commented 2 weeks ago

Still in the process of trying to fix it locally but I think the above should become

const request = new Request('http://server:8000/dj-rest-auth/login/'

Also seeing in seo-audits-toolkit/server/core/settings.py that ALLOWED_HOSTS is [] when I think it should be pulling from the env var, i.e.

ALLOWED_HOSTS = os.environ.get("ALLOWED_HOSTS", 'http://localhost:8000').split(",")
anoduck commented 2 weeks ago

@bocklucas Unsure if this repo is being actively maintained, have you tried seonaut? It is actively maintained. I made a fork of it my-seonaut

bocklucas commented 2 weeks ago

Ooooo thanks for calling out @anoduck :pray:

anoduck commented 2 weeks ago

@bocklucas I know, I am amazing.