Skip to content
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

[Bug]: Internal pictrs request tries to connect via external proxy #5270

Open
5 tasks done
rayes0 opened this issue Dec 18, 2024 · 0 comments
Open
5 tasks done

[Bug]: Internal pictrs request tries to connect via external proxy #5270

rayes0 opened this issue Dec 18, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@rayes0
Copy link

rayes0 commented Dec 18, 2024

Requirements

  • Is this a bug report? For questions or discussions use https://lemmy.ml/c/lemmy_support
  • Did you check to see if this issue already exists?
  • Is this only a single bug? Do not put multiple bugs in one issue.
  • Do you agree to follow the rules in our Code of Conduct?
  • Is this a backend issue? Use the lemmy-ui repo for UI / frontend issues.

Summary

9184800 avoids proxying pictrs requests, useful when running in docker (see #3489). However, some pictrs requests are still attempted through the proxy from here:

let fetch_url = format!(
"{}image/download?url={}&resize={}",
pictrs_config.url,
encode(image_url.as_str()),
context.settings().pictrs_config()?.max_thumbnail_size
);
let res = context
.client()
.get(&fetch_url)
.timeout(REQWEST_TIMEOUT)
.send()
.await?
.error_for_status()?
.json::<PictrsResponse>()
.await?;

Currently, the requests fail when running in docker and using the system proxy. It should be set to not use the proxy like the other pictrs requests.

Steps to Reproduce

  1. Run lemmy in docker with proxy environment variables set
  2. Observe attempts like the following being passed to the proxy: TCP_MISS/502 4070 GET http://pictrs:8080/image/download?

Technical Details

n/a

Version

BE: 0.19.7

Lemmy Instance URL

No response

@rayes0 rayes0 added the bug Something isn't working label Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant