RunOnFlux / flux-domain-manager

Flux Domain Manager is a service for handling Flux network request for domain assignment to Flux itself or specific application
GNU Affero General Public License v3.0
16 stars 23 forks source link

Feature: Enable preserve in cookie config stanza #107

Closed MorningLightMountain713 closed 2 months ago

MorningLightMountain713 commented 2 months ago

This change allows fluxapps to set their own persistence cookie.

Behaviour before this change:

if the FDMSERVERID cookie was set by an app, FDM would strip it and replace it with it's own.

Behaviour after this change:

if the FDMSERVERID cookie is set by an app, FDM will "preserve" it. If it is missing, FDM will set it.

This allows for new app usecases. For example, an app may have a frontend and a backend and may want to influence what frontend server get used from the backend, or a backend may want to remove itself from the session persistence by setting the cookie to blank (or another server)

This is currently running on fdm-usa-2-1 and fdm-fn-2-1 (manually configured).

Tested and working as expected.