Skip to content

Fix WebProxy address format in sample#2772

Merged
MihaZupan merged 1 commit intodotnet:mainfrom
MihaZupan:sample-webproxy
Mar 4, 2025
Merged

Fix WebProxy address format in sample#2772
MihaZupan merged 1 commit intodotnet:mainfrom
MihaZupan:sample-webproxy

Conversation

@MihaZupan
Copy link
Member

No description provided.

@MihaZupan MihaZupan added this to the YARP 2.4 milestone Feb 27, 2025
@adityamandaleeka
Copy link
Member

Did this not work before this change, or is this cleanup due to schema validation hygiene?

@MihaZupan
Copy link
Member Author

I added the WebProxy part to this config while adding the schema support as it was one of the few features that weren't showcased (we could choose to remove the WebProxy part as well since it's a sample). In this case this config is valid by the schema, but results in an error at runtime due to the url not being valid.

The reason why I chose not to enforce uri formats on these settings as part of the schema is that we support rewriting strings at runtime with config filters, e.g.

"cluster1/destination1": {
// Following value will be found by regex and looked up as an environment variable
"Address": "{{contoso}}"
},

And we do have a test where all appsettings.json in the repo are validated against the schema.

@MihaZupan MihaZupan merged commit 9cf0ce9 into dotnet:main Mar 4, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants