You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when using server-side-single-map, using the overrides UI on multiple routes can cause overrides persist in cookies even after they have been deleted in the UI.
// server.js // ExpressJS middleware - used on each route that requests a document w/ import-map-overridesconstimportMapOverridesMiddleware=(req,res,next)=>{constoverrides=importMapOverrides.getOverridesFromCookies(req);if(Object.keys(overrides).length===0){app.locals.importMap=app.locals.originalImportMap;}else{app.locals.importMap=newMap([...app.locals.originalImportMap, ...Object.entries(overrides)]);}next();};
I am also using server-side-single-map and am impacted by a sub-issue of this. Bullet 4, reset all overrides cookie is not deleted. If you reset an individual override, the cookie is deleted. However when disabling any individual override, the cookie is also not deleted. This causes inconsistencies between the UI state and the import map returned by the server.
Disabling should have the same end result as removing.
What
Scenario
"elephant": "https://ci.assets.avalara.com/one-web-domain/elephant/0.0.0%2b8a086bcf"
import-map-override:elephant
import-map-override:elephant:"https://ci.assets.avalara.com/one-web-domain/elephant/0.0.0%2b8a086bcf"
import-map-override:elephant
has been deletedpath=/
, one onpath=/elephant
/elephant
Proposed solution
Path=/;
both when adding and removing server cookiesThe text was updated successfully, but these errors were encountered: