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

Implement set-cookie scriptlet #79

Closed
slavaleleka opened this issue Apr 16, 2020 · 3 comments
Closed

Implement set-cookie scriptlet #79

slavaleleka opened this issue Apr 16, 2020 · 3 comments

Comments

@slavaleleka
Copy link
Contributor

https://github.com/NanoAdblocker/NanoCore2/blob/master/src/snippets.js

(it was mentioned in other issue)

@slavaleleka slavaleleka self-assigned this Apr 16, 2020
@slavaleleka slavaleleka added this to the 1.2 milestone Apr 16, 2020
@ameshkov ameshkov modified the milestones: 1.2, 1.3 Apr 16, 2020
@ameshkov
Copy link
Member

It is dangerous to provide an option to set an arbitrary cookie.

What about the same approach as with set-constant? The question is what rules are there for set cookie scriptlet?

@slavaleleka
Copy link
Contributor Author

slavaleleka commented May 28, 2020

I suppose that it can be made in such way:

example.org#%#//scriptlet("set-cookie", name, value[, path])

  • name — required — cookie name to be set
  • value — required. possible values (the most common):
    • 1 / 0 (or number >= 0 && < 15)
    • true / True
    • false
    • yes / Yes / Y
    • no
    • ok / OK
  • path ( ? ) — optional — defaults to '/' (root path). or maybe it's not needed at all because there are set-cookie js-rules only with path=/;

@ameshkov
Copy link
Member

@slavaleleka makes sense

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

No branches or pull requests

3 participants