You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
PUI CORS issues only with the default part image #5948
Tried now, still the same behavior.
So to clarify, what I did:
run inventree server on port 8000
run pui via npm run dev
connect to http://localhost:5137, add a new server pointing to http://localhost:8000
open the parts page where a lot of parts that have no image are shown
I have just retried locally, with the server pointing at both localhost:5173 and localhost:8000 - both seem to work on my end. Do the tables load? Just the images are not coming through?
Everything loads, just tested again with chrome (was using safari before on macos). Everything loads, except the image of parts that have no part image. Same for the demo server with a locally run frontend. Because I get a lot of these errors:
Do you also run the frontend on port 5137 and accessed it through that port and than added a new server host at localhost:8000, selected that and opened the parts list where parts are shown that have no image associated?
Is there something that I need to configure first on the inventree dev server?
And I also get a lot of these prompts that quickly close after they are shown
This could be related to these rejected responses from the server that appear in the console:
Here you can see that there is a WWW-Authenticate: Basic realm="api" header send back from the server that indicate for the browser to show such a basic login dialog:
It should not need configuration, maybe my specific CORS settings for dev address it but they are insecure for deploy so we need to look into this properly.
Activity
SchrodingersGat commentedon Nov 20, 2023
I believe this is related to how Django handles static files in particular, with the "development" server.
Ref: https://stackoverflow.com/questions/55751033/django-cors-on-static-asset
wolflu05 commentedon Nov 30, 2023
Should we then use this
--nostaticmethod for development by default and setup the static handlers ourselves?SchrodingersGat commentedon Nov 30, 2023
I think we might have to, yeah
SchrodingersGat commentedon Jan 22, 2024
@wolflu05 this may have been fixed now with latest CORS fixes - can you please confirm when you have a chance?
wolflu05 commentedon Jan 23, 2024
I still have the error, do I need to do something specific or just pull the newest code? (I tested with d502d93)
SchrodingersGat commentedon Jan 23, 2024
@wolflu05 have you tried with a private browser session? There may still be some issues with old sessions muddying the waters
wolflu05 commentedon Jan 23, 2024
Tried now, still the same behavior.
So to clarify, what I did:
npm run devhttp://localhost:5137, add a new server pointing tohttp://localhost:8000SchrodingersGat commentedon Jan 23, 2024
I have just retried locally, with the server pointing at both
localhost:5173andlocalhost:8000- both seem to work on my end. Do the tables load? Just the images are not coming through?wolflu05 commentedon Jan 23, 2024
Everything loads, just tested again with chrome (was using safari before on macos). Everything loads, except the image of parts that have no part image. Same for the demo server with a locally run frontend. Because I get a lot of these errors:

Do you also run the frontend on port 5137 and accessed it through that port and than added a new server host at localhost:8000, selected that and opened the parts list where parts are shown that have no image associated?
Is there something that I need to configure first on the inventree dev server?
And I also get a lot of these prompts that quickly close after they are shown

This could be related to these rejected responses from the server that appear in the console:

Here you can see that there is a

WWW-Authenticate: Basic realm="api"header send back from the server that indicate for the browser to show such a basic login dialog:SchrodingersGat commentedon Jan 23, 2024
Ah, ok for the static files I am also getting a CORS error still:
This is separate to the issues that I have recently been looking into.
matmair commentedon Feb 9, 2024
I think this was addressed. Can you validate if it now works on your setup @wolflu05? I'm not sure if my config or the code makes it work.
wolflu05 commentedon Feb 9, 2024
Tested with 8638f3b, but it's still not working, still getting these CORS issues from the initial post. Do I have to configure something special?
matmair commentedon Feb 9, 2024
It should not need configuration, maybe my specific CORS settings for dev address it but they are insecure for deploy so we need to look into this properly.