In this video you’ll learn how to build a proxy server with the Fastify framework and the
fastify-http-proxy plugin. This can help your front end application call an API securely. The proxy server will allow you keep the API key away from the front end and take care of adding it to API requests.
- Code for this video on GitHub
- Article: How to securely call an authenticated API from your front end – The article version of this video.
- fastify-http-proxy – A Fastify plugin to proxy HTTP requests to another server.
- fastify-reply-from – A Fastify plugin to forward the current HTTP request to another server.
- undici – "A HTTP/1.1 client, written from scratch for Node.js".