About istio mixer developing a validated adapter

Hello, everyone. Today, the company is going to use mixer in istio to develop a scheduler. It is used to verify whether it is legal through some data in the request.header after the user requests. If it is legal, the service after the request is allowed. If it is not legal, the service after the request is rejected and terminated in the middleware. But I still don"t know how to use it after studying it for two days. So I"d like to ask the god to give me some advice.
https://github.com/istio/isti.
I now follow this example to write an adapater, and then refer to the opa.go in the mixer source code to replace it, but it doesn"t work. So I want to ask how to get request.header, and return a rejected method

Dec.14,2021

I haven't used this framework, but I just looked at the source code. The header you want should be in context.Context

.
Menu