Published

SUCCESSFUL Adventures in setting up ActivityPub + Webfinger on a Flywheel-hosted WordPress site

Updated 31 October 2023 at 2:45pm to edit the NGINX config and give a further explanation.

I gave up too soon!

Emerson from Flywheel did more digging in the Fastly cache documentation and realized that we could tweak the NGINX config to fully support content negotiation. He added a Vary header to the necessary URLs et voilà, everything started working properly. Now, courtesy of Matthias Pfefferle’s great WordPress plugins and Flywheel’s dogged help, you can follow this blog on Mastodon if you search for @blog@piperhaywood.com or https://piperhaywood.com/@blog.

For future reference, this is the NGINX config tweak that got ActivityPub and Webfinger working on Flywheel with their Fastly caching setup:

location ~* /.well-known/webfinger {
    default_type application/activity+json;
    add_header Vary Accept;
    include internal-proxy.conf;
}

location ~* / {
    add_header Vary Accept;
    include internal-proxy.conf;
}

It’s fairly self-explanatory, but essentially the first location block ensures that all Webfinger endpoints have a default content type of application/activity+json, adds a Vary HTTP header so that Flywheel’s caching via Fastly will cache different versions of the page depending upon the content type, and includes further configuration via an internal-proxy.conf file. The second location block ensures that all URLs across the site basically do all of the above, but no default content type is set. (TBH I feel like I might only need the second block… but at this point everything is working nicely so I’m not going to ask the kind souls at Flywheel to change the config yet again!)

Colin from Flywheel explained the internal-proxy.conf file to me in my far-too-long support ticket:

The internal-proxy.conf is indeed an internal file that has platform-specific rules. Some of this config file is just simple cache rules, excluding common paths, whereas other parts are potentially sensitive as they pertain to our load balancing and proxy configs.

So that’s it! You can follow this blog now on Mastodon, and all blog posts published after October 30th should show up.

Published

Adventures in setting up ActivityPub + Webfinger on a Flywheel-hosted WordPress site

Update: We got it working! Take a look at this post for more.


I recently moved my hosting from NFSN to Flywheel. NFSN had served me beautifully for years, very economically, but I just don’t have as much time for admin anymore and Flywheel’s managed WordPress hosting was a useful move to cut down on that stress.

Alongside the hosting move, I’ve been trying to set up the very talented Matthias Pfefferle’s ActivityPub and Webfinger WordPress plugins to get this site on Mastodon.

Unfortunately, Flywheel doesn’t seem to play super nicely with the plugins. Part of this is Flywheel’s NGINX configuration which they lock down tight with good reason. But the bigger sticking point is Flywheel’s full-page caching mechanism. Though their caching provider supports content negotiation, Flywheel itself does not. This causes issues where JSON can end up being cached instead of HTML on various pages, most notably the homepage. (Apologies if you saw a JSON blob when visiting this site recently!) We tried to get around this by forcing the content type on the homepage and Webfinger endpoints, but JSON was still served up on the homepage whenever a client sent through a header with Accept: application/activity+json.

For now, I’ve deactivated the plugins. I’m hoping that Flywheel might look in to supporting them more broadly, but that realistically depends on demand from their customers. For posterity since I hope to revisit this in the future 🤞, here is the discussion about all of the above within the Webfinger repo, including some tips from Matthias.

Flywheel’s support staff have been pretty fantastic through all of this and I’ve been really happy with the hosting thus far so I’m not tempted to move hosts (again) for this. Not yet at least!

Published

“Power and safety are not the same thing”

It’s been an awful, heartbreaking October.

I don’t really know what to say about the conflict in Gaza and Israel. Part of it is that I don’t feel like I know enough. Both about all of the micro and macro events that have led up to this, and what’s going on in this moment. And I don’t really feel justified to share my feelings. It seems performative considering I have no personal ties and am many thousands of miles away.

But Eli did a great job articulating his feelings in this post, and I wanted to share that here since it is the one thing I’ve read that most closely mirrors my current thoughts.

It all feels a bit like staring in to the void.

“Tragedy” is almost a meaningless word, with the frequency it occurs.

Published

@piperhaywood.bsky.social

Finally went ahead and joined Bluesky, @piperhaywood.bsky.social (missed out on @piper, ah well). Thx for the code, Sam. 😘 Definitely not planning to leave Mastodon any time soon, but it felt like it was time to give it a go. IDK, Mastodon has started to feel… very pessimistically cynical? Understandable, but also exhausting. I probably need to refine my follows a bit, haven’t done that in a while.

I skimmed past a New Yorker headline earlier titled “Why The Internet Isn’t Fun Anymore”. And yeah, agreed, it’s definitely not as happy-go-lucky as it was in the past.

But I still find it fun! Maybe even more fun in some ways? So many great people are carving out their own niches online (by that, I mean personal sites or newsletters), and that’s where the real fun lies.

In other words: it’s all about RSS, baby! A place to really nurture your braincells away from any prying eyes or algorithms, where you can follow and unfollow with abandon without wondering, “well if I unfollow, are they gonna think insert-ridiculous-worry?”

And I’ve been hearing unexpected folks talking about RSS, family members and that sort of thing. Whisper it: is RSS becoming mainstream? 🤞 A girl can dream.

Will Bluesky also spark that joy? I’m skeptical. Mastodon is close but isn’t *quite* up there with RSS for me. We’ll see!

Published

Thoughts on search, AI as a rubber duck, and this blog

I’ve been working on a little side project recently that has been in the backlog for ages. I finally have a moment to pull it together, and it’s helping me brush up on a few Next.js 13 features I haven’t had the chance to play with yet.

As part of that, I’m doing a lot of searching around best practices on this that and the other, particularly server side rendering. It’s the first time in a while that I’ve been pointedly trying to use the internet to teach myself something in-depth related to coding, as opposed to finding quick sporadic answers.

Read some rambling thoughts on search 🔍, AI as a rubber duck 🦆, digital gardens 🪴, and the future of this blog 🧠

Published

Dave Rupert’s animation-timeline example

See Dave Rupert’s post on scroll shadows with animation-timeline. Browser support isn’t quite there yet so it’s more of a progressive enhancement, but this is a great use case example.

He wrote that off the back of Bramus’s scroll-driven animation exploration, and wow. So many of those behaviors would have been useful on past projects…

Published

Current listening: “Transatlanticism”

Currently listening to Transatlanticism 🐦
by Death Cab for Cutie.

One of my best friends from college just invited me to the Death Cab + Postal Service 20th anniversary gig at Madison Square Garden on the 20th. I am SO pumped.

Listening to Transatlanticism is giving me major high school flashbacks. Driving home past curfew on cool East Bay summer nights and knowing that I couldn’t possibly want, need, feel, any more than I did.