  Let $\Omega\subset\mathbb{R}^2$ be a smooth bounded domain with
$0\in\partial\Omega$. In this paper, we prove that for any $\beta\in(0,1)$, the
supremum $$\sup_{u\in W^{1,2}(\Omega), \int_\Omega u dx=0, \int_\Omega|\nabla
u|^2dx\leq1}\int_\Omega \frac{e^{2\pi(1-\beta) u^2}}{|x|^{2\beta}}dx$$ is
finite and can be attained. This partially generalizes a well-known work of
Alice Chang and Paul Yang (J. Differential Geom. 27 (1988), no. 2, 259-296) who
have obtained the inequality when $\beta=0$.
