Skip to content

How to get HTTP Headers? (newbie both in Rust & Rocket) #2041

Discussion options

You must be logged in to vote

Thanks a lot for your answer.
That's what I ended up doing for this case of Basic auth

But if I just want ot have a look at a header (for example I just want to log it) or perform a trivial process on it (for example if http_referer == "path" then do this else do that), do I have to write a request guard every time for every header (apart for the one supported out of the box)?

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@IniterWorker
Comment options

@IniterWorker
Comment options

@DuredhelFinceleb
Comment options

Answer selected by DuredhelFinceleb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants