Exemple #1
0
 /// <summary>
 /// When request is sent from administration domain of the site,
 /// adds header Access-Control-Allow-Origin into response to enable cross origin resource sharing (CORS) with the administration.
 /// </summary>
 /// <param name="builder">The application builder.</param>
 public static void UseResourceSharingWithAdministration(this ApplicationBuilder builder)
 {
     builder.RegisterModule(new CrossOriginResourceSharingWithCurrentSiteModule());
 }
Exemple #2
0
        /// <summary>
        /// Transparently handles preview URLs and also disables output caching in preview mode.
        /// </summary>
        /// <param name="builder">The application builder.</param>
        public static void UsePreview(this ApplicationBuilder builder)
        {
            var module = new PreviewFeatureModule();

            builder.RegisterModule(module);
        }