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

chore: allow custom hosts to send extentions requests #222

Merged
merged 1 commit into from
Jul 14, 2023

Conversation

jvelezpo
Copy link
Contributor

@jvelezpo jvelezpo commented Jul 12, 2023

Resolves #209
Relates to #221

Allows the extension to send request to other host different to wakatime.com, example: https://wakapi.dev/api/compat/wakatime/v1

Why only "permissions": ["<all_urls>"... in FF? Chome aff <all_urls> to origins by default so we only need to add it to FF

solves this issue with extensions and request permissions on demand error: permissions.request may only be called from a user input handler

@jvelezpo
Copy link
Contributor Author

@muety this is a simpler version of your PR, it allows the extension to set the baseUrl to something like https://wakapi.dev/api/compat/wakatime/v1 and it will work

Please review

@muety
Copy link

muety commented Jul 12, 2023

Looks good to me, but I'm confused by that fact that you apparently don't have to request the <all_urls> in Chrome? Can a plugin always request any host it likes without asking for permission? Sure about that?

@jvelezpo
Copy link
Contributor Author

Looks good to me, but I'm confused by that fact that you apparently don't have to request the <all_urls> in Chrome? Can a plugin always request any host it likes without asking for permission? Sure about that?

Here is a console.log statement from chrome getting all permissions, <all_urls> is added by default in chrome

image image

@jvelezpo jvelezpo merged commit f3c1f10 into master Jul 14, 2023
1 check passed
@jvelezpo jvelezpo deleted the sebas-allow-custom-host branch July 14, 2023 00:51
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

Successfully merging this pull request may close these issues.

Allow to request permissions for custom hosts
3 participants