Hello, Im trying to get authorisation in between my reverse proxying and i have no clue how to do this.
I'm using a reverse-proxy-service crate gh fork.
To get the reverse proxying working, but I’ve got no clue how to inject my
Authorization in there, which should be handled by just having claim in the header and an ok ?
This works
async fn protected(claims: Claims) -> Result<String, AuthError> {
// Send the protected data to the user
Ok(format!(
"Welcome to the protected area :)\nYour data:\n{claims}",
))
}
let app = Router::new()
.route("/protected", get(protected))
.route("/authorize", post(authorize))
.route_service("/posts", host1.build(Static("/posts")))
.route_service("/posts/*path",host1.build(AppendSuffix("/")))
.layer(cors);