Skip to content

How to secure POST, PUT and DELETE but not GET? #1988

Answered by raman-m
moedeveloper asked this question in Q&A
Discussion options

You must be logged in to vote

I want to secure POST, PUT and DELETE but not GET, I would like to leave GET with no need for authentication. Is that how to do it?

Just don't define the verb!
Or, define 2 different routes with different upstream methods, but upstream templates can be the same.
1st route is authenticated, and the 2nd one is anonymous.

Note, your UpstreamPathTemplate of the second route includes the template of the first one.
/notification/{everything} contains /notification/device

Final config depends on your services. I can't recommend on the config more. Please finish your setup by your own!


also, how can I avoid the reputation of the repeated attributes?

Sorry? I don't understand you. There is no…

Replies: 1 comment 3 replies

Comment options

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

@moedeveloper
Comment options

@raman-m
Comment options

Answer selected by raman-m
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
Configuration Ocelot feature: Configuration Routing Ocelot feature: Routing
2 participants