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] Changes in rules dedinitions #6

Open
mdziczkowski opened this issue Sep 15, 2024 · 4 comments
Open

[Feature request] Changes in rules dedinitions #6

mdziczkowski opened this issue Sep 15, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@mdziczkowski
Copy link

I would like to request change how the rules are definied in the addon.

Not every one knows how to code and those who know, may know another programming language then javascript.

Thereof, I think it could be a nice option if the addon would become more universal in the matter of rules creation

@ichaoX ichaoX added the enhancement New feature or request label Sep 15, 2024
@ichaoX
Copy link
Owner

ichaoX commented Sep 15, 2024

It would be great to have a convenient interface, but creating complex rules at the same time is difficult.

The simple use of this extension is just to select a template and then edit its variables.

JavaScript knowledge is not required unless dealing with complex situations.

@mdziczkowski
Copy link
Author

What do you think about following example syntax:

- URL / pattern:
- action:
- ... (additional data at request)
- description

?

@ichaoX
Copy link
Owner

ichaoX commented Sep 19, 2024

What do you think about following example syntax:

- URL / pattern:
- action:
- ... (additional data at request)
- description

?

This may satisfy simple situations, but for more complex situations, additional learning will be needed, and the behavior can be unclear.

For example:

  1. Is the URL treated as a prefix? Does it include request parameters? What is the effect during redirection?
  2. Is the pattern a set of special definitions or a regular expression? Is it case-sensitive? How are regex groups handled in redirection?
  3. How to match based on multiple request header values, HTTP methods, or resource types?
  4. How to set multiple matching and exclusion conditions? Can complex logical conditions with multiple "and" and "or" branches be created?
  5. Should variables be automatically encodeURIComponent() during redirection?
    ...

These operations and behaviors require extra design during development, and users will need additional learning, while JavaScript may be clearer and more universal.

@mdziczkowski
Copy link
Author

  • The pattern should accept wildcards to allow better adjust to what it does apply

  • all pattern check's should be case-insensitive for simplier use

  • the proposal should be treated as a simple base rule to global manage the whole domains and their sub-domains

  • the remaining options for more experienced users and for fine control should be as additional (for example, after expanding the "advanced" tab)

  • there should be a section in with would be entered, listed and managed the exclusions. The input should also support wildcards

  • about the URL encoding abd decoding, that it need to be considered because in one side it provides a layer of security, but from other one, it makes things more complex and may cause that it won't work correctly 🤔

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

No branches or pull requests

2 participants