Suppose that $M$ is a manifold with boundary $\partial M$ and that there is a continuous map $f: M \rightarrow N$ (where $N$ is a smooth manifold). Whitney's approximation theorem states that $f$ can be $C^0$-approximated by a smooth map $g$, which can be made to agree with $f$ on $\partial M$ if $f$ is already smooth on $\partial M$. I am interested in dropping the condition that $f$ is smooth on $\partial M$.
Question: Can $f$ be approximated by map $g: M \rightarrow N$ which is smooth in $M\backslash \partial M$ and equal to $f$ on $\partial M$?
So in this case, $g$ can be quite bad on $\partial M$ but smooth in $M\backslash \partial M$. A sample case is $M = D^n, N = D^m$.