web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Unable to get 'Set hos...
Power Automate
Unanswered

Unable to get 'Set host URL' policy to work

(0) ShareShare
ReportReport
Posted on by 53

I have some custom connectors that connect to a reverse proxy via on-premises gateway. The Base URL defined in each custom connector is used by the reverse proxy to redirect the request to the right endpoint. The Base URL value defined in the custom connector is the only thing unique to each custom connector. The custom connectors work fine.

To reduce the number of custom connectors, I want to be able to have just one custom connector where I pass the environment name as a header parameter and have it update the URL accordingly. I have tried using the ‘set host URL’ policy but I cannot get it to work.

Here is the configuration (names changed for privacy) I have:

Existing custom connector 1 – works ok
- Connect via on-premises data gateway enabled
- Scheme: HTTP
- Host: myhost
- Base URL: /env1

Existing custom connector 2 – works ok
- Connect via on-premises data gateway enabled
- Scheme: HTTP
- Host: myhost
- Base URL: /env2

New custom connector – not working
- Connect via on-premises data gateway enabled
- Scheme: HTTP
- Host: myhost
- Base URL: /

The policy I have created on the new custom connector is:
- Template: Set host URL
- Applies to all operations
- URL Template: http://myhost/@headers(‘env’)

On requests, I am passing a header called ‘env’ with value set to either ‘env1’ or ‘env2’

When I test the connector I get a 500 response with "The remote name could not be resolved: myhost"

Does anyone have a suggestion on how I can get this working?

 

Categories:
I have the same question (0)
  • dmorland Profile Picture
    53 on at

    I think I may have found the answer to my own question.  I just noticed this line in the documentation:

     

    "Note that this policy currently does not support Gateway urls."

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard