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

Self hosting browser extension updates #4494

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Dadams2
Copy link

@Dadams2 Dadams2 commented Nov 8, 2024

Overrides the request URL for users who choose to set their own API URL, otherwise leaves it as is.

Changing the content-security-policy isn't ideal but I don't think we have another option.

Having a look at the rest of the extension it might be possible to get it all working with manifest v3. But this should work now.

I'm not sure how much sanitation of user inputted urls should be done.

@CLAassistant
Copy link

CLAassistant commented Nov 8, 2024

CLA assistant check
All committers have signed the CLA.

const auth = apiKey ? { Authorization: apiKey } : {}
return fetch(apiUrl, {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure it's the best idea to build the url this deep in the call stack. Minimally, I'm seeing that this is causing error messages generated in background.js to print out the wrong url since omnivoreGraphqlURL is hardcoded:

const omnivoreGraphqlURL = "https://api-prod.omnivore.app/api/"

which leads to misleading error messages when debugging the extension.

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.

4 participants