erisu commented on PR #155:
URL: 
https://github.com/apache/cordova-plugin-media/pull/155#issuecomment-1232734970

   Sorry that this PR was left open for quite a long time. I didn’t even start 
working on Cordova till about a year after this PR was created.
   
   Anyways, I have been going through older PRs and trying to find out what 
could be still relevant, what I understand, and that maybe I could merge.
   
   With regards to this PR, allowing UDP is acceptable but IMO, but I would 
like to refactor this area a step further for the next major release.
   
   Ideally to improve flexibility and security.
   
   My idea would be that a config preference would be created to allow users to 
provide the acceptable URL prefixes.
   
   For example:
   
   ```xml
   <preference name=“MEDIA_STREAMING_ALLOWED_PREFIX” value=“https://,http://” />
   ```
   
   With the above preference, UDP or anything else in the future could be added 
without a new PR.
   
   Also, the developer could even take their security a step further by 
providing a more exact URL prefix instead of just schemes.
   
   e.g.
   ```xml
   <preference name=“MEDIA_STREAMING_ALLOWED_PREFIX” 
value=“https://cordova.apache.org/” />
   ```
   
   Technically this PR could be merged in as is, but if we do create a config 
preference in the future for a later major release, the UDP scheme would stop 
working again as the idea of the plugin is to not accept or open any URL by 
default.
   
   What do you think about this?
   Do you think it’s something you want to do?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to