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

add proxy to screenshots #138

Open
tacman opened this issue Mar 18, 2024 · 2 comments
Open

add proxy to screenshots #138

tacman opened this issue Mar 18, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@tacman
Copy link
Contributor

tacman commented Mar 18, 2024

Description

You cannot generate screenshots from the Symfony CLI when using a proxy, as is common during development.

symfony proxy:domain:attach phpwa-demo
symfony server:start -d
symfony open:local

opens https://phpwa-demo.wip/

But you can't this the URL for the screenshot, because the proxy that's set up for the network (127.0.0.1:7080) isn't configured.

Example

 bin/console pwa:create:screenshot https://127.0.0.1:8003/ -o homepage
 bin/console pwa:create:screenshot https://phpwa-demo.wip/ -o homepage
@Spomky
Copy link
Member

Spomky commented Mar 18, 2024

I was not aware of this feature.
It does not work well on my env as well (WSL2).
I will dig into it and find a way to enable/retreive proxy from the command line

@Spomky Spomky self-assigned this Mar 18, 2024
@Spomky Spomky added the enhancement New feature or request label Mar 18, 2024
@Spomky Spomky added this to the 1.2.0 milestone Mar 21, 2024
@Spomky Spomky modified the milestones: 1.2.0, 2.0.0 Apr 24, 2024
@tacman
Copy link
Contributor Author

tacman commented Sep 5, 2024

Hi, I'm running into this, so I thought I'd ping you to check the status.

FWIW, curl man shows the following

-x, --proxy <[protocol://][user:password@]proxyhost[:port]>

     Use the specified HTTP proxy. 
     If the port number is not specified, it is assumed at port 1080.

In a Symfony app, I've used it like this.

curl \
  'https://my-app.wip/api/instances?page=1&itemsPerPage=40' \
  --proxy 'http://localhost:7080' \
  -X 'GET' \
  -H  "accept-language: es" \
  -H 'accept: application/ld+json' | jq

Using the default Symfony proxy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants