Skip to content

[Feature Request] Toggle to disable file fallback (SSE) #140

@LaurenceBarnes

Description

@LaurenceBarnes

Hi Granny,

as discussed on discord, I finally got around to opening this on github.

My setup is a bit weird, but very much on purpose. I serve the static Pl3xMap files from a VPS and sync them there periodically via rsync from my backend at home. I do that because occasional, rate-limited rsync traffic is a lot easier on my home connection than having all map traffic hit the backend directly. SSE is still proxied from the backend so I can have live marker updates.

That works fine in general, but it seems player markers are not staying purely SSE-driven. While a player is moving, the marker updates correctly. But once the player stands still, it seems to fall back to the static JSON state. In my setup, that means players can disappear while standing still, or reappear at an outdated location depending on the last sync.

I did manage to work around this by also reverse proxying the relevant player-related JSON files and disabling caching for them. But that is a bit awkward, very complex (even with Caddy), hard to maintain, and also means the map depends more directly on the backend being reachable. For cases when the server is offline, I even had to add another fallback snippet so that if the server is unreachable, the static path is served instead.

So would it be possible to add a toggle to disable file fallback for SSE live updates, so that player markers can remain purely SSE-driven instead of falling back to the static files?

If that is done, I'd even propose to add a small wiki section to the docs, I could prepare the text then. It is probably a nice solution for other people that have bandwidth good enough to host the mc server, but not the website.

Below the snippet I have been using to reverse-proxy all required static files:

(pl3xmap-live-json-matchers) {
	@pl3x_settings path /tiles/settings.json
	@pl3x_markers path_regexp pl3x_markers ^/tiles/[^/]+/markers/[^/]+\.json$
}

I can also share the entire voodoo config I set up if you like to :D

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions