  Recently, an anisotropic cosmological model was proposed. An arbitrary
1-form, which picks out a privileged axis in the universe, was added to the
Friedmann-Robertson-Walker line element. The distance-redshift relation was
modified such that it is direction dependent. In this paper, we use the Union2
dataset and 59 high-redshift gamma-ray bursts to give constraints on the
anisotropy of the universe. The results show that the magnitude of anisotropy
is about $D=-0.044\pm0.018$, and the privileged axis points towards the
direction $(l_0,b_0)=(306.1^{\circ}\pm 18.7^{\circ},-18.2^{\circ}\pm
11.2^{\circ})$ in the galactic coordinate system. The anisotropy is small and
the isotropic cosmological model is an excellent approximation.
