Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove superfluous router dependency in UI5 Server #606

Closed
LukasHeimann opened this issue Mar 21, 2022 · 1 comment
Closed

Remove superfluous router dependency in UI5 Server #606

LukasHeimann opened this issue Mar 21, 2022 · 1 comment
Labels
enhancement New feature or request wontfix This will not be worked on

Comments

@LukasHeimann
Copy link

Is your feature request related to a problem? Please describe.

I'm currently debugging for SAP/karma-ui5#410 and found something strange that seems related to my original problem:

UI5 Server has express as a dependency, yet the CSP middleware uses the router dependency to build a middleware.

Describe the solution you'd like

The additional router dependency could easily be replaced with the express.Router middleware. This is a change in two lines of code which seems rather simple: https://github.com/SAP/ui5-server/blob/5f3f5797cbafac3b3c170951b20ee69b9326a48c/lib/middleware/csp.js#L76

Describe alternatives you've considered

Keep and mix two different router dependencies.

@LukasHeimann LukasHeimann added the enhancement New feature or request label Mar 21, 2022
@LukasHeimann LukasHeimann changed the title Remove superfluous dependency in UI5 Server Remove superfluous router dependency in UI5 Server Mar 21, 2022
@matz3
Copy link
Member

matz3 commented Apr 14, 2022

Thanks for your suggestion!
The express router relies on express-specific APIs on the req / res object. This conflicts with the karma-ui5 integration which is based on connect.
So without solving SAP/karma-ui5#410 by enhancing req/res, this change can't be made. And as this is not planned right now, I'm closing this as wontfix.

@matz3 matz3 added the wontfix This will not be worked on label Apr 14, 2022
@matz3 matz3 closed this as completed Apr 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants