Seaside icon indicating copy to clipboard operation
Seaside copied to clipboard

Add config option to WADispatcher to redirect instead of answering

Open eMaringolo opened this issue 4 years ago • 0 comments

WADispatcher>>handleDefault: automatically delegates to the handler for default name (if defined), but this causes issues with cookie tracking strategies, because the path of the cookie contains the path of the default name (e.g. /app) instead of the root path (/) causing unnecessary session creation because the session cookie is not found.

Proposed change

WADispatcher>>handleDefault: aRequestContext
	self defaultName isNil
		ifTrue: [ aRequestContext responseGenerator forbidden; respond ]
		ifFalse: [ 
			self redirectToDefaultName 
				ifTrue: [aRequestContext redirectTo: self defaultName ]
				ifFalse: [self handleFiltered: aRequestContext named: self defaultName ]
		]

eMaringolo avatar Aug 17 '20 17:08 eMaringolo