Outbound Header addition not working in V1.5

Imported Google Group message. Original thread at: Redirecting to Google Groups Import Date: 2016-01-19 21:07:23 +0000.
Sender:Jayadatta Vallabhaneni.
Date:Thursday, 12 March 2015 22:20:50 UTC.

HI,

I am trying to install and play with the latest version. Noticed that the header addition under Endpoint Designer is not working. I am not able to view/receive the newly added headers on the target server. Could you please check and let me know if i am missing anything? I was trying to add “ClientId” : “10.10.10.10” in the header going to the target. Below is my api xml.

/* 0 */
{
“_id” : ObjectId(“5501f74e83d64f081d000001”),
“name” : “testDetails”,
“api_id” : “155ec446ec894114768152478cf4e50f”,
“org_id” : “550130e583d64f0f43000001”,
“use_keyless” : true,
“use_oauth2” : false,
“oauth_meta” : {
“allowed_access_types” : [],
“allowed_authorize_types” : [],
“auth_login_redirect” : “”
},
“auth” : {
“auth_header_name” : “”
},
“use_basic_auth” : false,
“notifications” : {
“shared_secret” : “”,
“oauth_on_keychange_url” : “”
},
“enable_signature_checking” : false,
“hmac_allowed_clock_skew” : -1.0,
“definition” : {
“location” : “header”,
“key” : “x-api-version”
},
“version_data” : {
“not_versioned” : true,
“versions” : {
“RGVmYXVsdA==” : {
“name” : “RGVmYXVsdA==”,
“expires” : “”,
“paths” : {
“ignored” : [],
“white_list” : [],
“black_list” : []
},
“use_extended_paths” : true,
“extended_paths” : {
“ignored” : [],
“white_list” : [],
“black_list” : [],
“cache” : [],
“transform” : [],
“transform_headers” : [{
“delete_headers” : [],
“add_headers” : {
“ClientId” : “10.10.10.10”
},
“path” : “/osb/getDetailPS_RT”,
“method” : “GET”
}]
}
}
}
},
“proxy” : {
“listen_path” : “/155ec446ec894114768152478cf4e50f/”,
“target_url” : “http://localhost:8011/”,
“strip_listen_path” : true
},
“custom_middleware” : {
“pre” : [],
“post” : []
},
“cache_options” : {
“cache_timeout” : NumberLong(60),
“enable_cache” : false,
“cache_all_safe_requests” : false
},
“session_lifetime” : NumberLong(0),
“active” : true,
“auth_provider” : {
“name” : “”,
“storage_engine” : “”,
“meta” : { }
},
“session_provider” : {
“name” : “”,
“storage_engine” : “”,
“meta” : null
},
“event_handlers” : {
“events” : { }
},
“enable_batch_request_support” : false,
“enable_ip_whitelisting” : false,
“allowed_ips” : [],
“dont_set_quota_on_create” : false,
“expire_analytics_after” : NumberLong(0),
“hook_references” : []
}

Imported Google Group message.
Sender:Martin Buhr.
Date:Thursday, 12 March 2015 23:54:44 UTC.

Hi,

It looks like you are using a non-versioned definition, but giving the default version a name, so tyk can’t find it - you’ll need to change the key for the version from “RGVmYXVsdA” to “default” in both the key that defines the first version and the name field.

Explanation: in a non-versioned API, tyk expects a default version to exist, not just the first version in the list.

Hope that helps,
Thanks,
Martin

  • show quoted text -

  • show quoted text -


You received this message because you are subscribed to the Google Groups “Tyk Community Support” group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web, visit https://groups.google.com/d/msgid/tyk-community-support/1da0fb28-878a-4aef-bd9d-4b92d73e6b1c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Imported Google Group message.
Sender:Martin Buhr.
Date:Friday, 13 March 2015 00:19:31 UTC.

Thank you Martin. Will try and update you on the outcome.
Regards,
Jayadatta

  • show quoted text -

Imported Google Group message.
Sender:Martin Buhr.
Date:Friday, 13 March 2015 02:04:21 UTC.

Hi Jayadatta,

I just realised, it needs to be capitalised too - so the names should read “Default”.

That’s something that we might want to change :wink:

Apologies for the inconsistency!

Thanks,
Martin

  • show quoted text -

Imported Google Group message.
Sender:Jayadatta Vallabhaneni.
Date:Friday, 13 March 2015 06:09:49 UTC.

Hi Martin,

It is working fine now after creating a version. I am able to pass custom headers to the target.

Thanks for your help.

Regards,
Jayadatta

  • show quoted text -