<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Reverse Proxy on Lloyd Rochester's Geek Blog</title><link>https://lloydroc.github.io/tags/reverse-proxy/</link><description>Recent content in Reverse Proxy on Lloyd Rochester's Geek Blog</description><generator>Hugo</generator><language>en</language><copyright>Copyright © 2025, Lloyd Rochester.</copyright><lastBuildDate>Fri, 05 Jul 2019 07:40:01 +0000</lastBuildDate><atom:link href="https://lloydroc.github.io/tags/reverse-proxy/index.xml" rel="self" type="application/rss+xml"/><item><title>Enable CORS when not Supported</title><link>https://lloydroc.github.io/post/networking/nginx-cors-proxy/</link><pubDate>Fri, 05 Jul 2019 07:40:01 +0000</pubDate><guid>https://lloydroc.github.io/post/networking/nginx-cors-proxy/</guid><description>&lt;p>Some services don&amp;rsquo;t support &lt;a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS">CORS&lt;/a>, but we can use NGINX to make CORS supported with this simple hack! To enable CORS on any service we need to have NGINX configured as a &lt;a href="https://lloydroc.github.io/post/networking/couchdb-nginx-proxy/">Reverse Proxy&lt;/a> and have NGINX add a successful pre-flight response to the CORS pre-flight request. Read on to get this simple example to work.&lt;/p>
&lt;p>Let&amp;rsquo;s back all the way up on why CORS is needed? Security! What if we could write Javacript on a server somewhere and that Javascript could use any back-end server it wanted for requests? That would introduce huge security vulnerabilities. For example, I could write a webpage that looks like a store, but not have a back-end for the store at all and send bogus orders to another store somewhere else on the internet that my site isn&amp;rsquo;t affiliated with. CORS gives us security that a front-end and back-end match up. From the back-end we can control what front-end has access to the back-end and also what requests that front-end can make.&lt;/p></description></item><item><title>NGINX/CouchDB Reverse Proxy</title><link>https://lloydroc.github.io/post/networking/couchdb-nginx-proxy/</link><pubDate>Wed, 10 Oct 2018 03:10:00 +0000</pubDate><guid>https://lloydroc.github.io/post/networking/couchdb-nginx-proxy/</guid><description>&lt;p>Using NGINX as a front-end server to forward to multiple back-end services works great by configuring NGINX as a reverse proxy. The reverse proxy configuration will have NGINX serve HTTP/HTTPS URLs and forward them to them to network addresses such as a database listening on HTTP at a specific port, API servers, static websites, etc. Basically we can turn NGINX into an HTTP router. NGINX is also a great front man for back-end services such as HTTPS and HTTP/2. For instance if you had a Database, API Server and static site you could have an SSL certificate just for NGINX and they would all be behind HTTPS and the reverse proxy would convert the HTTPS and send HTTP. That&amp;rsquo;s a post for another time however.&lt;/p></description></item></channel></rss>