Closed Gnarflord closed 2 months ago
I have also noticed that the URLs for API access are not correct, which seems to be a related issue:
Part-DB API: https://myurl.com/partdb/api
KiCad API root URL: https://myurl.com/partdb/en/kicad-api/
Part-DB API: http://myurl.com/partdb/api
KiCad API root URL: http://myurl.com/en/kicad-api/
So the issues are:
partdb
which the Part-DB API got correctHave you set the correct TRUSTED_PROXIES env for Part-DB?
My env contains: TRUSTED_PROXIES=127.0.0.1,REMOTE_ADDR
As to my understanding that basically allows connections from any address, right?
I can also manually access https://myurl.com/partdb/kicad/footprints.txt
and see the correct file in my browser. The issue only arises because the interface wants to look up https://myurl.com/kicad/footprints.txt
instead
This is now fixed
Describe the bug When I begin typing in the field for my KiCad footprint I will get HTML elements as suggestions:
(Resistor_R:R_1206_3216Metric was added manually by me, I don't get any auto-completes from the default library)
Now If I empty the field I can see the whole HTML document being parsed. This is a fun way of debugging I've never encountered before :)![image](https://github.com/Part-DB/Part-DB-server/assets/19466442/82a5dad6-a0d3-46e1-9de7-a1992b4de32d)
Now that's basically my Apache server telling me that there's a 404 error and the URL does not exist. If I look into the Apache log I see:
Aha! I'm hosting under a subpath like
https://myurl.com/partdb
but the footprint lookup searches underhttps://myurl.com
without the subpath. My Apache config for the reverse proxy looks like this:Maybe I've set something up the wrong way but
X-Forwarded-Prefix
is definitely working as the page breaks completely if it's missing. But somehowX-Forwarded-Prefix
is ignored for this particularly footprint lookup.I have also set
DEFAULT_URI
tohttps://myurl.com/partdb/
but that doesn't seem to have any impact.Server Side
Desktop (please complete the following information):