Hiding Your API Credentials Client Side Using a Proxy Server in Reactby@gethackteam
2,368 reads

Hiding Your API Credentials Client Side Using a Proxy Server in React

tldt arrow
Read on Terminal Reader
Read this story w/o Javascript

Too Long; Didn't Read

The library `http-proxy-middleware is a great tool to use when you want to proxy requests to an API. It only takes a couple of lines of code to set up and use, and it's very flexible. When you use this client in your React application to send requests to a GraphQL API, React will execute the request on the client side. This means that the request is visible from the network tab in the browser, and when you're building an application that external users use they will be able to see this API key.

Companies Mentioned

Mention Thumbnail
Mention Thumbnail
featured image - Hiding Your API Credentials Client Side Using a Proxy Server in React
Roy Derks HackerNoon profile picture

@gethackteam

Roy Derks


Receive Stories from @gethackteam

react to story with heart

RELATED STORIES

L O A D I N G
. . . comments & more!
Hackernoon hq - po box 2206, edwards, colorado 81632, usa