Repository navigation
Conversation
alan-agius4
left a comment
There was a problem hiding this comment.
Thanks for adding port support to allowedHosts. Left a few inline comments around port validation, hot path performance in isHostAllowed, and extra test coverage.
Please also update the docs in adev/src/content/guide/security.md (the "Configuring allowed hosts" section) to document port support in allowedHosts (such as example.com:443, *.example.com:8443, [::1]:4200, localhost:*, and *:8443) and note that omitting the port remains backwards compatible and allows any port. It would also be good to update the allowedHosts description in adev/src/content/reference/configs/workspace-config.md and the JSDoc on renderApplication and renderModule.
Currently `allowedHosts` allows requests on any port as long as the host matches. These changes expand the check so consumers can also set the ports they want to allow within `allowedHosts`.
beaba6a to
8c50e4b
Compare
|
Feedback has been addressed. |
alan-agius4
left a comment
There was a problem hiding this comment.
LGTM
Reviewed-for: fw-security
Currently
allowedHostsallows requests on any port as long as the host matches. These changes expand the check so consumers can also set the ports they want to allow withinallowedHosts.