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

Disable links if data-method exists and is not GET #47

Closed
david-a-wheeler opened this issue Aug 28, 2019 · 1 comment
Closed

Disable links if data-method exists and is not GET #47

david-a-wheeler opened this issue Aug 28, 2019 · 1 comment

Comments

@david-a-wheeler
Copy link

david-a-wheeler commented Aug 28, 2019

Rails is a popular framework and supports an optional "data-method" parameter, like this:

<a rel="nofollow" data-method="delete" href="/en/logout">

It would be very bad to automatically follow such links if data-method exists and is not GET.

Solution: Simply don't preload a links that have a data-method and provide a value other than GET (any case).

See also: dieulot/instantclick#170

@dieulot
Copy link
Member

dieulot commented Aug 30, 2019

I don’t want to add code specific to Rails.

Also, if the /en/logout endpoint works only on DELETE, preloading it on GET should have no adverse effect, right?

@dieulot dieulot closed this as completed Aug 30, 2019
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

No branches or pull requests

2 participants