Skip to content

Deploying API Management XML Policy with unique endpoints to multiple environments #6092

Answered by brwilkinson
c64breadbin asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @c64breadbin

There is likely a few different ways to achieve this and also a few different formats.

I will suggest a few options.

In the most simplest I think is Use Replacement strings along with placeholders

e.g. {0}, {1}, {2} etc.

Then save the XML text file, since we will use loadtextcontext

<policies>
    <inbound>
        <base />
        <cors allow-credentials="true">
            <allowed-origins>
                <origin>{0}</origin>
            </allowed-origins>
            <allowed-methods preflight-result-max-age="1209600">
                <method>*</method>
            </allowed-methods>
            <allowed-headers>
                <header>*</header>
            </allowed…

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@c64breadbin
Comment options

@brwilkinson
Comment options

@levimatheri
Comment options

@dirkslab
Comment options

@chsami
Comment options

Answer selected by brwilkinson
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants