Layer7 API Management

  • 1.  Reading API Key from Header

    Posted 03-04-2016 11:18 AM


    I hope this is an easy one...  I'm authoring policy outside of the Portal.  My policies are authored to be Portal Managed and have the fragments set to enforce api key and plan requirements.  My question is how can I get the api key from a header rather than a querystring parameter?  I see where in the fragments where the key is being pulled out, but I want to know if there is an easy way to influence this before I go and muck with things.



  • 2.  Re: Reading API Key from Header
    Best Answer

    Posted 03-08-2016 10:18 AM

    You can get the value from the system defined context variable ${request.http.header.<name_of_header>}. Replace all of <name_of_header> with the name of the header that contains the API key.