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

Feature request: Lock plugin server port. #24

Open
beruic opened this issue Apr 8, 2021 · 5 comments
Open

Feature request: Lock plugin server port. #24

beruic opened this issue Apr 8, 2021 · 5 comments

Comments

@beruic
Copy link

beruic commented Apr 8, 2021

I just had a problem with using this plugin because of our apps Content-Security-Policy.
I had to add localhost:* to the policy to make the plugin work.

I do not like that I have to allow all ports to make this work, and thus my request is:
Add the possibility to lock the server to a specific port. With this possible, the Content-Security-Policy would not need to be so permissive.

@diachedelic
Copy link
Owner

What if the port is not available on the device? Should it fail and run in fallback mode?

@beruic
Copy link
Author

beruic commented Apr 26, 2021

Good question. How about defining an array or range of port numbers so it's predictable? That way, you can set the CSR for these numbers and have the vast majority blocked, while having a good chance of having at least one of them free.

@diachedelic
Copy link
Owner

For simplicity, I am inclined to let a single port number be specified. If the port is taken, it can run in fallback mode.

@beruic
Copy link
Author

beruic commented Apr 27, 2021

As long as you can detect that the port is taken somehow and warn the user, I'm fine with that.

@beruic
Copy link
Author

beruic commented Apr 27, 2021

Of course the current behaviour should be available too for those relying on that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants