-
Notifications
You must be signed in to change notification settings - Fork 75
Closed
SAP/ui5-server
#184Labels
module/ui5-serverRelated to the UI5 Server moduleRelated to the UI5 Server module
Description
Expected Behavior
When I link from openui5
to the latest release of the ui5-tooling
, I expect that grunt serve
continues to work.
Current Behavior
grunt serve
starts but fails for each request and responds with an error stack trace (see below).
I unfortunately caused the issue myself with PR SAP/ui5-server#179 as I relied on express
APIs in the csp
middleware (request.path
and request.params
). But in the context of grunt serve
, express
is obviously not used and the APIs are missing.
Steps to reproduce the issue
- Clone
openui5
andui5-tooling
- Link from
openui5
to@ui5/server
at least - Run
grunt serve
and open any HTML page
Affected components (if known)
Log Output / Stack Trace
TypeError: Cannot read property 'endsWith' of undefined
at csp (/SAPDevelop/sapui5-dist/openui5/node_modules/@ui5/server/lib/middleware/csp.js:40:41)
at call (/SAPDevelop/sapui5-dist/openui5/node_modules/connect/index.js:239:7)
at next (/SAPDevelop/sapui5-dist/openui5/node_modules/connect/index.js:183:5)
at /SAPDevelop/sapui5-dist/openui5/grunt/config/connect.js:130:7
at call (/SAPDevelop/sapui5-dist/openui5/node_modules/connect/index.js:239:7)
at next (/SAPDevelop/sapui5-dist/openui5/node_modules/connect/index.js:183:5)
at Function.handle (/SAPDevelop/sapui5-dist/openui5/node_modules/connect/index.js:186:3)
at Server.app (/SAPDevelop/sapui5-dist/openui5/node_modules/connect/index.js:51:37)
at emitTwo (events.js:126:13)
at Server.emit (events.js:214:7)
at parserOnIncoming (_http_server.js:602:12)
at HTTPParser.parserOnHeadersComplete (_http_common.js:116:23)
Metadata
Metadata
Assignees
Labels
module/ui5-serverRelated to the UI5 Server moduleRelated to the UI5 Server module