We study the Bayesian problems of detecting a change in the drift rate of an observable diffusion process with linear and exponential penalty costs for a detection delay. The optimal times of alarms are found as the first times at which the weighted likelihood ratios hit stochastic boundaries depending on the current observations. The proof is based on the reduction of the initial problems into appropriate three-dimensional optimal stopping problems and the analysis of the associated parabolic-type free-boundary problems. We provide closed-form estimates for the value functions and the boundaries, under certain nontrivial relations between the coefficients of the observable diffusion.