BOSTON — This is where the Maple Leafs try to change the ending.

After beating the Bruins in back-to-back elimination games to force their first-round playoff series to the limit — just like they did in 2013 — the Leafs are hoping to finish the job Wednesday in Boston in Game 7.

That’s something they couldn’t do five years ago, when they became the first team in NHL history to blow a three-goal, third-period lead and lose a Stanley Cup playoff game.

“We’ve got some more work to do,” said goalie Frederik Andersen, who stopped 32 of 33 shots in Game 6 on Monday to help the Leafs win 3-1 and prolong their season.

“It’s the same kind of pressure we’ve felt these last two games, where we’ve been facing elimination,” he said. “Game 7 should be the same. It’s something that you all dream of — those big moments — and you also want to perform.”

So do the Bruins, who have struggled to put away the Leafs for the second consecutive time. In 2013, the Maple Leafs won two straight and then opened a 4-1 lead in the third period of Game 7, but the Bruins scored a pair of goals 31 seconds apart in the final 2 minutes of regulation before winning in overtime.

The winner of Wednesday night’s game will play the Lightning, who eliminated the Devils in five games.

The Lightning will host the first two games, regardless of which opponent advances.

“I don’t think there’s any panic at all in this group,” Bruins coach Bruce Cassidy said.

The Maple Leafs feel the same way.