-
Notifications
You must be signed in to change notification settings - Fork 29
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
Forward to External Proxy not set on US region #1445
Comments
The feature should be available in the similar fashion on that deployment. No other path needed. |
Which endpoints are you talking about? The |
Yes, those are the endpoints I'm calling to const AddProduct = () => { I tried the same thing with mc-api.us-central1.gcp.commercetools.com and got a 404 in both cases. If I replace them with https://mc-api.commercetools.com/proxy/forward-to/ I get a 401 instead |
It was another mistake in my configs; I had changed some settings to troubleshoot and hadn't switched them back. Sorry for the mistake. The JWT decoding isn't working, but I suspect that's something on my end |
Hi @iaindwyer thanks for the code snippet. As a side-note: using backticks really helps readibility on things. Also the On GCP EUcurl 'https://mc-api.europe-west1.gcp.commercetools.com/proxy/forward-to' \
-H 'x-project-key: <projectKey>' \
-H 'x-forward-to: https://mc-api.europe-west1.gcp.commercetools.com' \
-H 'cookie: mcAccessToken=<token>' and I get { "message":"Hi, I am the API." } On GCP UScurl 'https://mc-api.commercetools.co/proxy/forward-to' \
-H 'x-project-key: <projectKey>' \
-H 'x-forward-to: https://mc-api.commercetools.co' \
-H 'cookie: mcAccessToken=<token>' and I get { "message":"Hi, I am the API." } I don't see any problem here. Plus the small CURL command really help to share and guide reproducibility on either side. |
@iaindwyer Let us know if we can help you with that. PS: we're considering providing a package that includes most of the required setup for an external server to "work". See #1444 |
Thanks @emmenko, I was able to get a custom lambda authorizer working with the JWT token you forward. We're using Lambdas and API Gateway for our backend implementation so in our case an HTTP server would not be helpful. |
I started working on a package with tools and helpers to be used by the server implementation. See #1447 The package contains a I suppose you can use that in your lambda functions. In any case, I recommend to send the following additional HTTP headers to the
The v2 header ensures that the I haven't updated the docs yet, but I plan to do this by the end of this week. Let me know if you have further questions or feature requests. Thanks |
I'm trying to use the Proxy to External API functionality documented here but it appears that the endpoints only exist for the European region.
I tried making the call in that documentation to both mc-api.commercetools.co and mc-api.us-central1.gcp.commercetools.com and got a 404 both times. When I tried the equivalent European values I got a 401 (which would make sense, as I'm not logged into that instance).
Should I be using a different path for this region?
The text was updated successfully, but these errors were encountered: