Hello I was trying to write the rule below in Traefik:
Host(`localhost`) && HeadersRegexp(`Content-Type`, `application/grpc(?!-web)(.*)`)
Unfortunately I have discovered that golang does not have negative lookahead in regular expression.
How can I write it in a way that the golang regex engine will understand.
https://regex101.com Is a good way to know learn and test go regexps.
Hope it helps
Use the rule logical operators to advantage:
Host(`localhost`) && HeadersRegexp(`Content-Type`,`application/grpc.*`) && !HeadersRegexp(`Content-Type`,`application/grpc-web`)
Hello @tommoulard ,
I have done that unfortunately.The answer I get After googling is not supported in golang
This is very simple and great.
Am not sure why I did not think of the second part.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.