RSS lives and the topic has come up a few times recently. It got me thinking and reading stuff I haven’t looked at in a long time.
Alan’s Feed WordPress 101 is still gold and reminded me of all kinds of things I had forgotten. Back in the glory days of RSS and the Mother Blog, the hardest part was usually getting the right URL for the feed. Alan had all sorts of ways to try to help people. We built a choose your own adventure path into the old Thought Vectors process but often we’d resort to doing it manually for people.
I thought that maybe I could build something using WordPress’s REST API that might make checking the feed validity more interactive and obvious.
What you can see below is an early proof of concept.1 Anyway, I built it initially and congratulated myself. Then I realized I’d only tested it on my own site and it didn’t work on any other site. Why? CORS. CORS. CORS. I had set up my own site long ago to allow access to the API from other sites but that’s not the default state in WordPress.
A bit of Googling led me to a PHP proxy on GitHub that was made to deal with just this issue. I also had some hassle with direct PHP file access in my Reclaim Hosting directory that I tried to solve via .htaccess for some time before Tim helped me out. Turns out it’s a Apache issue and maybe some other ownership stuff.
The example below should let you put in a URL like https://bionicteaching.com/feed and it’ll show the feed content below if it’s the right URL.
If I end up with an audience/purpose, I’d make it just a plain URL that’d show the feed content. Then it’d load your category options as buttons to allow you to modify the restrictions on the feed and preview what impact those choices would have. That seems pretty nice. The downside is that it’d only work for modern-ish WordPress.
1 Do I do anything else? Probably not.