Url mapping
is there a way to make my api think it was requested with the public url (ex: oxygennext.apigee.com ) instead of its real url (ex: 174.165.0.15:8080 ) !?
1
person has this question
I have this question, too!
Tell me when someone answers.
The more people who ask this question, the more it gets noticed.
The more people who ask this question, the more it gets noticed.
The company marked this question as answered.
-
Inappropriate?Hi Matthias, let me make sure I understand your question... are you asking if your API can recognize that particular calls arrived via Apigee?
If so, perhaps you could create a duplicate API endpoint just for Apigee, and then you'd know for sure. As far as I know, there is no other way, other than knowing the originating IP address, which comes from an ever-growing pool.
If I haven't understood your question, would you explain exactly what you're trying to accomplish?
Thanks,
Marsh -
Inappropriate?no. i will try to explain better:
my api makes use of the url it is used with (it reads it from the incoming http header).
the problem with apigee is that my api still thinks it it run on its private url.
ex:
public url is: http.//oxygennext.apigee.com
private url is: http://dev.oxygenmediaplatform.com:8080/
so my api generates wrong links because it thinks his address is "http://dev.oxygenmediaplatform.com:8080/" but its not, its: oxygennext.apigee.com
of course i could fix this by hardcoding (or make it configureable) the url to my api. but i would like to keep it dynamically.
i know that for example microsoft isa server offers this kind of feature and thought it would be maybe possible here too!? -
Matthias, let me look into this and get back to you. -
Inappropriate?Matthias, Manoj suggested that the http message would have a http header which is "X-Forwarded-Host" which would contain the value oxygennet.apigee.com
You can then make a decision based on that. Would that work?
The company says
this answers the question
-
Inappropriate?that should do the job :) at least for my case. i am just thinking what you can do generally if you don't have access to the api sourcecode...lets say like for twitter or somethin!?
I’m excited
-
Inappropriate?when will you have it up?
-
I'm checking into the status of this and will get back to you soon. -
Matthias, I got confirmation from the dev team that this is already in production. If you have any feedback on this, please be sure to let us know. -- Marsh -
Inappropriate?so you mean its already online!?
-
yes! -
Inappropriate?hmmm...i'm maybe to stupid, but it is not working for me! i added support to my api for "X-Forwarded-Host" Header and testet it with fiddler by adding it to my request...all worked fine.
but when i try using my api through apigee, apigee doesnt seem to add the "X-Forwarded-Host" header!? when i again add the header with fiddler it works.
what is it i'm doing wrong here?
I’m confused
-
Matthias, I'm sorry you're having trouble with this. As you're the first person to ask about this, I appreciate your patience as we work through it together. :)
Are you looking for the following header X-Forwarded-Host or X-Forwarded-For?
The orginial IP for the client should be available in X-Forwarded-For, while the original request is available in X-Forwarded-Host
If you could copy the header from an API request that you knew had arrived via Apigee, that might help speed things along. -
Inappropriate?this is what wireshark gives me:
GET / HTTP/1.1
Via: 1.1 42SERVER-ISA, 1.1 42SERVER-ISA
Host: dev.oxygenmediaplatform.com:8080
Cookie: __unam=7639673-124bf01b641-2b7dc770-13; __utma=228393283.130858774.1257853644.1257853644.1258542392.2; __utmz=228393283.1257853644.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2; OfficeLiveConnector.1.3; OfficeLivePatch.0.0)
Accept: image/jpeg, application/x-ms-application, image/gif, application/xaml+xml, image/pjpeg, application/x-ms-xbap, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, application/x-shockwave-flash, */*
Accept-Language: de-DE
X-Forwarded-For: 195.50.187.130
Connection: Keep-Alive -
Good news—thanks to your help we've found a bug that's preventing this from working properly at the moment. We really appreciate your patience and all the detail you've given, which made it possible to find the problem.
We're trying to get the fix deployed in this week's sprint. I'll report back when I know more.
Much obliged! -
Inappropriate?Ok, I heard from engineering that the fix should be deployed. Please let me know if you continue to have trouble with this! And again, thanks for your help in tracking down the issue.
I’m thankful
-
Inappropriate?lol
its there, but written wrong:
GET / HTTP/1.1
Via: 1.1 42SERVER-ISA, 1.1 42SERVER-ISA
Host: dev.oxygenmediaplatform.com:8080
Cookie: __unam=7639673-124bf01b641-2b7dc770-13; __utma=228393283.130858774.1257853644.1257853644.1258542392.2; __utmz=228393283.1257853644.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2; OfficeLiveConnector.1.3; OfficeLivePatch.0.0)
Authorization: Basic YWRtaW46MTIzMTIz
Accept: */*
Accept-Language: de-DE
X-Forwarded-For: 195.50.187.130
X-Forwared-Host: api.oxygennext.com
Connection: Keep-Alive -
lol, that's a great catch. I'll see that we correct that spelling. :) -
1 person says
this answers the question
Loading Profile...




EMPLOYEE