V1: Problems with Caddy + TiddlyWiki

1. My Caddy version (caddy -version):

v1.0.3

2. How I run Caddy:

Systemd service

a. System environment:

uname -a

Linux raspberrypi 4.9.35+ #1014 Fri Jun 30 14:34:49 BST 2017 armv6l GNU/Linux

d. My complete Caddyfile:

mywebsite.co.uk:443 {
	root /var/www/html/
	gzip

	proxy /wiki pi3:8923 {
	    transparent
	    without /wiki
	}
}

3. The problem I’m having:

I’m running the nodeJS version of TiddlyWiki

When trying to access it via the reverse proxy, most of TiddlyWiki loads fine, but I get a 400 error when TiddlyWiki makes a PUT XHR request as it looks like some characters are being encoded, e.g.

This is supposed to look like $:/StoryList

I think it’s related to this issue Updating system tiddlers doesn't work behind apache proxy · Issue #560 · Jermolene/TiddlyWiki5 · GitHub, the suggested solution was to apply AllowEncodedSlashes On, but obviously that’s for Apache

5. What I already tried:

I’m not sure how to replicate the AllowEncodedSlashes On solution in Caddy

6. Links to relevant resources:

https://github.com/Jermolene/TiddlyWiki5/issues/560

Ah… this issue.

:slight_smile:

It all started here: Encoded slash in URL · Issue #643 · caddyserver/caddy · GitHub

In that thread, follow the linked PRs for more discussion, particularly this one: Encoded slash in URL · Issue #1582 · caddyserver/caddy · GitHub

The good news is, I think in v2 we could handle this much better. I’d be very interested to know how this works in v2 currently, and since we’re still in beta we can find ways to handle it better if we want/need to change it.

Can you please give it a try on Caddy 2 and see how it goes?

Hi Matt,

Just tried it with Caddy v2 and it works, so looks like it’s fixed there :+1:

I think it will take a while for me to convert my config to caddy v2 as I use stuff like client cert auth and will need to spend some time working out what to do, the default ./caddy run -adapter caddyfile... didn’t seem to like a lot of the things in my v1 Caddyfile!

Thanks for taking the time to reply, glad to see it’s fixed in v2!

1 Like

Well that is a relief indeed! Caddy 1 mangled the URL a lot more because of how the static file server was integrated, but Caddy 2 has a new design where we don’t touch the URL at all.

Yeah, still polishing up v2 in this area. We’ll have a migration guide before the stable release though. It’ll be one of the last things to be done, though.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.