Skip to content

Conversation

@cyqsimon
Copy link

What does this PR do?

  • Bug fix
  • Improvement
  • New feature

Currently you can specify a URL for the rule list of each switch profile, but said URL has to be publicly accessible. Due to the potentially-sensitive nature of the rule list, it would be nice to support authenticated sources too.

This PR adds the ability to add custom header values to the fetch, which allows the user to specify things like an authorization header. This would enable, for example, fetching the rule list from a private gist or repository.

Compatibility

The feature is opt-in. No breaking changes.

Screenshots

New UI with custom headers Outgoing request with custom headers

Copy link
Author

Choose a reason for hiding this comment

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

xhrWrapper currently doesn't handle other 4xx errors (most notably 401 and 403), and instead treat those as success. Obviously this isn't ideal, but this belongs in a separate PR.

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.

1 participant