Thank you, this is the same code as mine.
Unfortunately, with this code, the pagination stops working for me.
It seems that the module can only process the first attribute, and only the rel="next" is accepted. The second rel="nofollow" attribute breaks its functionality.
@prem suthar: Can you show your TWIG template, please?