Ejemplo n.º 1
0
        protected override void ApplicationStartup(TinyIoC.TinyIoCContainer container, IPipelines pipelines)
        {
            BeforePipeline bp = new BeforePipeline();

            // Since we are including the API in the Parking.UI package (because of server constraints)
            // we need to remove the prefix folder so the routes are taken correctly.
            bp.AddItemToStartOfPipeline(ctx => {
                ctx.Request.Url.Path = ctx.Request.Url.Path.Replace("/api", "");
                return ctx.Response;
            });

            pipelines.BeforeRequest += bp;

            // Register gzip compression
            pipelines.RegisterCompressionCheck();

            base.ApplicationStartup(container, pipelines);
        }
Ejemplo n.º 2
0
        protected override void ApplicationStartup(TinyIoC.TinyIoCContainer container, IPipelines pipelines)
        {
            BeforePipeline bp = new BeforePipeline();

            // Since we are including the API in the Parking.UI package (because of server constraints)
            // we need to remove the prefix folder so the routes are taken correctly.
            bp.AddItemToStartOfPipeline(ctx => {
                ctx.Request.Url.Path = ctx.Request.Url.Path.Replace("/api", "");
                return(ctx.Response);
            });

            pipelines.BeforeRequest += bp;

            // Register gzip compression
            pipelines.RegisterCompressionCheck();

            base.ApplicationStartup(container, pipelines);
        }
Ejemplo n.º 3
0
 protected override void ApplicationStartup(TinyIoCContainer container, IPipelines pipelines)
 {
     base.ApplicationStartup(container, pipelines);
     pipelines.RegisterCompressionCheck();
     this.Conventions.StaticContentsConventions.Add(StaticContentConventionBuilder.AddDirectory("st", "Static"));
 }
Ejemplo n.º 4
0
 protected override void ApplicationStartup(TinyIoCContainer container, IPipelines pipelines)
 {
     base.ApplicationStartup(container, pipelines);
     pipelines.RegisterCompressionCheck();
 }