I want to add a custom short line in the right of my subsection as shown below:

Here is my .tex, how could I add the short blue line in the subsetion right side, and not display in Contents?
\documentclass{article}
\usepackage{lipsum}
\renewcommand{\thesection}{\arabic{section}.}
\renewcommand\thesubsection{\arabic{section}.\arabic{subsection}.}
\begin{document}
\tableofcontents
\section{section1}
\subsection{subsection1}
\lipsum[1]
\subsection{sub2}
\lipsum[2]
\end{document}
