aem-project-archetype icon indicating copy to clipboard operation
aem-project-archetype copied to clipboard

Duplicated API call for model.json on short URL pages - call for /.model.json

Open Bastek333 opened this issue 4 years ago • 2 comments

I have experienced additional API call in network tab for /.model.json for page which use short url like https://foo/bar/ - this call is not present for https://foo/bar.html

Expected Behaviour : For https://foo/bar/ model json call should be https://foo/bar.model.json

Actual Behaviour: For https://foo/bar/ model json call is duplicated https://foo/bar.model.json and https://foo/.model.json

On some servers where /. calls are blocked this behavior is breaking page loading - as /.model.json is rejected - and application doesn't get JSON as this second /.model.json overwriting first proper call /bar.model.json duplicate

Bastek333 avatar Sep 23 '21 07:09 Bastek333

Hello @Bastek333 , I would like to know if there was a solution to the problem? Thanks!

rodrigoMaciel avatar Dec 11 '21 17:12 rodrigoMaciel

Hello @Bastek333 , I would like to know if there was a solution to the problem? Thanks!

Sort of overcome solution - just JS code removing / on the end of url in address bar on the page load. Dirty solution as anyway they are 2 calls for model.json

Bastek333 avatar Feb 01 '22 08:02 Bastek333