-
-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Footprint autocomplete will suggest HTML elements #587
Comments
I have also noticed that the URLs for API access are not correct, which seems to be a related issue: What I expect
What I got
So the issues are:
|
Have you set the correct TRUSTED_PROXIES env for Part-DB? |
My env contains: I can also manually access |
…roxy in a prefixed path This fixes issue #587
This is now fixed |
Describe the bug
![image](https://private-user-images.githubusercontent.com/19466442/320194352-44b61a5f-4feb-4b7a-8376-0db5cf9c00a9.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk2OTkyODQsIm5iZiI6MTczOTY5ODk4NCwicGF0aCI6Ii8xOTQ2NjQ0Mi8zMjAxOTQzNTItNDRiNjFhNWYtNGZlYi00YjdhLTgzNzYtMGRiNWNmOWMwMGE5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE2VDA5NDMwNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTY2OTY2ZWI2ZDdjY2I1NmU4NzcyNzU2YjgzMjYyMWY2YjAxNTE3YjJkOGEwNTBjZjA2NGEwNDM4NDYwNjI2NmMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.0G7GQaWtwoJHcot9u-0MbydA8znUWxzHoRgiQMp2Zkk)
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://private-user-images.githubusercontent.com/19466442/320194427-82a5dad6-a0d3-46e1-9de7-a1992b4de32d.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk2OTkyODQsIm5iZiI6MTczOTY5ODk4NCwicGF0aCI6Ii8xOTQ2NjQ0Mi8zMjAxOTQ0MjctODJhNWRhZDYtYTBkMy00NmUxLTlkZTctYTE5OTJiNGRlMzJkLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE2VDA5NDMwNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPThkYzQ3Y2UwNGJjNDFkNmY5YzUxYTZlYjNlNjcwMDBkZTM5NGUzZDgwMTk5YTJlOTU4YjY2ZDY1M2JmZDllNmImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.EHktxTc_llP8bv6kQSyWF1BcoOpzkRWSIm42UMDy2lg)
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):
The text was updated successfully, but these errors were encountered: