Comments (11)
Since there was a question in Slack referencing this issue here the solution for further searcher.
If you have a proxy setup commonly they can/should set an additional request header like:
X-Forwarded-Proto: https
Which you can use for setting SSL secured mode on Apache vhost which is forwarded to PHP so it could regonize the encrypted connection scheme.
<VirtualHost *:80>
...
SetEnvIf X-Forwarded-Proto https HTTPS=on
...
</VirtualHost>
Bests
from api-php-client.
I simply added HTTPS=On to the .env file and it works like a charm.
No need to mess with the proxy config.
from api-php-client.
To get this right you have to configure your trusted proxy (app.php or index.php) there's a comment there. Then, Request->isSecure()
should return true.
from api-php-client.
This is all kinda vague for me and not really straight forward to implement.
Why not have an easy setting for Akeneo to use SSL or not SSL.
Or even better when you request a page in Akeneo API you send the pagining back in the same method as the request - http or https...
from api-php-client.
I have no clue if there is a direct configuration setting in Akeneo.
My view is as "system administrator" which have to get and stay it running.
Thats the point you should consider yourself for next round which maybe someone else then could respond to if interested:
Why not have an easy setting for Akeneo to use SSL or not SSL.
I offered this switch in Apache config by setting right variable to on (it's automatically set by mod_ssl which is in this case isn't used):
SetEnvIf X-Forwarded-Proto https HTTPS=on
If you are lazy or unwillingly to set it conditionally then change it to
SetEnv HTTPS on
Or even better when you request a page in Akeneo API you send the pagining back in the same method as the request - http or https...
HOW show Akeneo know about it e.g. if there is Apache http running behind an HAproxy offering SSL termination? => Solution: my vhost / SetEnvIf example
from api-php-client.
I am still confused about all this. I tried the suggestions you gave but it did not give me a sollution. And if I look at the original question I'm not alone with this problem.
If I try the same request (no http) with https://reqbin.com/ then it follows the redirect to https and returns the data.
For some reason the "GuzzleHttp\Psr7\Request" does not follow this redirect, although in there documentation it says it would. (http://docs.guzzlephp.org/en/stable/quickstart.html#redirects)
from api-php-client.
Since there was a question in Slack referencing this issue here the solution for further searcher.
If you have a proxy setup commonly they can/should set an additional request header like:
X-Forwarded-Proto: https
Which you can use for setting SSL secured mode on Apache vhost which is forwarded to PHP so it could regonize the encrypted connection scheme.
<VirtualHost *:80> ... SetEnvIf X-Forwarded-Proto https HTTPS=on ... </VirtualHost>
Bests
Works for me. Thanks!
Running PIM CE in docker container behind a Traefik reverse proxy
from api-php-client.
Since there was a question in Slack referencing this issue here the solution for further searcher.
If you have a proxy setup commonly they can/should set an additional request header like:
X-Forwarded-Proto: https
Which you can use for setting SSL secured mode on Apache vhost which is forwarded to PHP so it could regonize the encrypted connection scheme.
<VirtualHost *:80> ... SetEnvIf X-Forwarded-Proto https HTTPS=on ... </VirtualHost>
Bests
Also works for me using nginx as reverse proxy. Thanks.
To my mind, this is the right way to solve this problem when working with reverse proxies.
from api-php-client.
Since there was a question in Slack referencing this issue here the solution for further searcher.
If you have a proxy setup commonly they can/should set an additional request header like:
X-Forwarded-Proto: https
Which you can use for setting SSL secured mode on Apache vhost which is forwarded to PHP so it could regonize the encrypted connection scheme.<VirtualHost *:80> ... SetEnvIf X-Forwarded-Proto https HTTPS=on ... </VirtualHost>
Bests
Also works for me using nginx as reverse proxy. Thanks.
To my mind, this is the right way to solve this problem when working with reverse proxies.
Can you please put here what you've done in Nginx please !
from api-php-client.
Could we consider it as resolved and close it?
from api-php-client.
I would suggest adding the https=on in the .env to the documentation for use in proxied servers asa solution
from api-php-client.
Related Issues (20)
- Missing function for deleting product models HOT 1
- PHP 8.1 Deprecations HOT 1
- Add [\ReturnTypeWillChange] attribute to current and key methods in ResourceCursor class HOT 1
- Filter products for a single vendor
- symfony/options-resolver is used in src/Client/Options.php but it is only dev requirement through another package HOT 1
- auto switch to http from https with error HOT 4
- Unexpected exception when instantiating class - error in Symfony 5.4 and PHP 8.1 HOT 1
- Filters doesn't work for categories. HOT 2
- api-php-client calls undefined function in pim HOT 3
- IN operator not working for assets
- upsertList not working on Windows HOT 1
- Filters doesn't work for categories
- $client->getCategoryApi()->all() returns empty parent and position values for all
- Set a timeout when sending requests to Akeneo
- Random Server Side errors on random products
- Missing getter for private totalIndex
- Not able for get table attribute select options
- psr/http-message Current Version Issue HOT 8
- Support for symfony 7.0 HOT 1
- Suggested package php-http/guzzle6-adapter is deprecated
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from api-php-client.