2

I am using WSO2 AM 2.6, with two domains pointing to the GW host:

  1. domain1.com
  2. domain2.com

Is there a way to figure out, inside a mediator or a custom handler, if the API was invoked using domain1.com or domain2.com? Either a property or function that will return the following:

Looking at synapse properties, I see there are properties such as REST_API_CONTEXT and REST_API_ENDPOINT_PATH, but all return /endpoint/1.0.0 and not the complete URL, including the "domainX.com" part.

Ofer Lahav
  • 411
  • 4
  • 14

1 Answers1

1

The hostname should be available in the Host HTTP header.

Bee
  • 12,251
  • 11
  • 46
  • 73