Analytic function on a domain is injective if its image of the boundary is a simple closed curve I have trouble figuring out the following problem on complex analysis:

Let $U$ be a bounded domain with a simple closed curve as smooth boundary $C=\partial U$. Let $f$ be an analytic function in $U$,
continuous on its closure. Prove that $f$ is one to one in $U$, if
$f(\zeta),\zeta\in C$, describes a simple closed curve.

What I have tried so far only works if $f$ is differentiable on the boundary $C$, which may not be true. That's why I wonder if there is a solution that actually works. But in any case, maybe it would be useful to post my attempt:

Assume $f$ admits a derivative everywhere on the boundary $C$. Let $z\in U$ be fixed. We want to show that $f(\zeta)=f(z)$ implies $\zeta=z$. To this end, we consider the zeros of the function $f(\zeta)-f(z)$. Clearly $\zeta=z$ is a zero. We want to show that this is the only zero in $U$ of this function. By the argument principle, the number $N$ of zeros of $f(\zeta)-f(z)$ in $U$ is given by
$$
N=\frac{1}{2\pi i}\int_{C} \frac{f'(\zeta)}{f(\zeta)-f(z)}d\zeta.
$$
Now let us change variable $\omega=f(\zeta)$. Then $d\omega=f'(\zeta)d\zeta$. Therefore
$$
N=\frac{1}{2\pi i}\int_{f(C)}\frac{d\omega}{\omega-f(z)}=n(f(C),f(z))
$$
which is the winding number of the simple closed curve $f(C)$ around $f(z)$.
Now, since $f(C)=f(\partial U)=\partial f(U)$, which includes $f(z)$ since $z\in U$, we have that
$$N=n(f(C),f(z))=1.$$
And since $z\in U$ is arbitrary, this proves that $f$ is one to one in $U$.

The Professor told me this problem can be solved using homotopy theory. So I also wonder how does it work. But since this is a complex analysis problem, maybe there is also a solution that involves only complex analysis. Any comment or suggestion is appreciated. Thanks!
 A: In general, you use the Caratheodory theorem that shows that any Riemann map (holomorphic isomorphism) from a Jordan domain to another Jordan domain extends to a continuous injective (hence bijective) map of the boundaries; in particular here first we note that since $U$ is a Jordan domain there is a Riemann map $g:\mathbb D \to U$ which extends continuously and injectively from the unit circle $\Gamma$ onto $C$
If $J=f(C)$ is a Jordan curve, then letting $V$ the interior domain of $J$ we have that $f(U) \subset V$ since $f(U)$ is open connected ($f$ holomorphic non constant) and $\partial f(U) \subset J$
(first we must have $f(U) \cap (\mathbb {\hat C}-\bar V)$ empty since $\infty \notin f(U)$ hence if the intersection is not empty, there is a path in $\mathbb {\hat C}-\bar V$ connecting $\infty$ with some $w \in f(U)$, but that path must intersect $\partial f(U)$ hence $J$, contradiction!, so $f(U) \subset V\cup J$ and since $f(U)$ open we must have $f(U) \subset V$)
But now $V$ is a Jordan domain so we have a Riemann map $h:V \to \mathbb D$ that extends continuously and injectively from $J$ to $\Gamma$
Putting it together we get a map $\psi=h \circ f \circ g: \mathbb D \to \mathbb D$ that extends to an injective continuous map from the unit circle onto itself, hence $\psi$ is a finite Blaschke product (this is standard by eliminating the finitely many zeroes with a finite Blaschke product $B$ and using maximum modulus for $\psi/B, B/\psi$ to conclude $\psi/B$ is constant) and since it is injective on the unit circle it must be of degree one so is a disc automorphism; since $h,g$ are holomorphic isomorphisms, it follows that $f=h^{-1}\circ  \psi \circ g^{-1}$ is too!
