can you please provide an example of HTTP rule in yaml? If I try the following visual studio fails with an error:
http:
name: web
port: 80
hosts:
- name: "*"
routes:
- match:
path:
value: "/first"
rewrite: "/"
type: Prefix
destination:
applicationName: TwoApis
serviceName: Api1
endpointName: Api1Listener
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
Thanks for the feedback! We are currently investigating and will update you shortly.
@aloneguid
Could you try this:
http:
- name: web
port: 8090
hosts:
- name: "*"
routes:
- name: "n"
match:
path:
value: "/first"
rewrite: "/"
type: Prefix
destination:
applicationName: TwoApis
serviceName: Api1
endpointName: Api1Listener
As per the schema, routes requires a "name". We will fix the sample and docs.
@kavyako yes, I can confirm it works by adding name, thank you!
By the way if it makes a difference, I also had to change
path:
value: "/first"
rewrite: "/"
type: Prefix
to
path:
value: "/first/"
rewrite: "/"
type: Prefix
because rewrite leaves double slash in the url if I use original sample.
@MicahMcKittrick-MSFT
Please close this.
Most helpful comment
@aloneguid
Could you try this:
As per the schema, routes requires a "name". We will fix the sample and docs.