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
I'm trying to write a middleware that looks at the extension of the requested page, strips it from the requested URL, and adds a 'format' property matching the mime-type of the extension. But no matter what, the URL gets set back to what it was before.
Even if I pass a new request object (with next) the URL still cannot be changed.
This seems like important functionality to give to middlewares.
This seems to happen because of line 223 in index.js. I'm not sure what the best solution is, but I think it is probably not to have any routing happening at all in Connect but relegate it to middlewares. That would certainly be more rack like. Either that or before line 223 do a check to see if you are dealing with the same URL and if not don't set it.
The text was updated successfully, but these errors were encountered:
I'm trying to write a middleware that looks at the extension of the requested page, strips it from the requested URL, and adds a 'format' property matching the mime-type of the extension. But no matter what, the URL gets set back to what it was before.
Even if I pass a new request object (with
next
) the URL still cannot be changed.This seems like important functionality to give to middlewares.
This seems to happen because of line 223 in index.js. I'm not sure what the best solution is, but I think it is probably not to have any routing happening at all in Connect but relegate it to middlewares. That would certainly be more rack like. Either that or before line 223 do a check to see if you are dealing with the same URL and if not don't set it.
The text was updated successfully, but these errors were encountered: