Skip to content

How to restrict the upstream APIs to a particular url #1887

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

You must be logged in to vote

Hi! Why not to define authentication route?
Your React app could sign simple jwt-token with custom claim, with custom header name, with short expiration time (<= Timeout).
Then, authenticate, then transform claim to a static header if API is private. If it's public, I recommend to close API turning it to authorized with a short jwt-token from React app.
Pay attention, your React app plays the role of identity server generating all auth-tokens for all apps in your workflow.
Hope it helps!

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
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
question Initially seen a question could become a new feature or bug or closed ;)
2 participants
Converted from issue

This discussion was converted from issue #1491 on January 06, 2024 14:14.