Dead-simple Go CLI that converts CSV data from stdin into Nginx redirection location blocks and outputs them to stdout. Useful for CI/CD pipelines where you need to generate Nginx redirection rules dynamically.
- Basic CSV data with two columns: e.g.
from,to
curl https://example.com/redirects.csv | csv-to-nginx > /etc/nginx/conf.d/redirects.conf
Gracefully handles missing rows in the CSV data.
Inspiration for this tool came from this Stack Overflow answer. Handy for working with Google Sheets and other data sources that support csv exports.
Highly experimental. Do not use in production.