Implementing Middleware Patterns in ASP.NET Core

In ASP.NET Core 2.2, middleware is configured in the Startup class: public void Configure(IApplicationBuilder app, IHostingEnvironment env) { app.Use(async (context, next) => { context.Response.ContentType = "text/html; charset=utf-8"; await context.Response.WriteAsync("<h3>Middleware1 start</ ...

Posted on Sat, 20 Jun 2026 17:58:51 +0000 by Reformed

Node.js Web Development with Express.js

Express.js is a minimalist, flexible, and robust web framework for Node.js. It simplifies the process of building web applications and APIs by providing a comprehensive set of features for routing, middleware integration, and handling HTTP requests and responses. While Node.js includes a built-in http module for server creation, Express offers ...

Posted on Sun, 31 May 2026 20:28:21 +0000 by Illusion

Building Middleware Docker Images: PHP-FPM with Nginx

Having established a base CentOS 7 image, the next step is to construct middleware images. This example demonstrates building a Docker image that integrates Nginx and PHP-FPM. The project structure is as follows: docker-training/ ├── centos7/ ├── mysql/ ├── php-fpm/ │ ├── Dockerfile │ ├── nginx_default.conf │ ├── nginx_nginx.conf │ ├── ...

Posted on Fri, 29 May 2026 22:51:44 +0000 by esscher

Understanding Gin Middleware Flow: Next(), Abort(), and the Onion Model

Gin Context Handling // Gin context processing func (engine *Engine) HandleContext(c *Context) { oldIndexValue := c.index c.reset() engine.handleHTTPRequest(c) c.index = oldIndexValue } // Route matching logic func (engine *Engine) handleHTTPRequest(c *Context) { httpMethod := c.Request.Method rPath := c.Request.URL.Path unes ...

Posted on Thu, 28 May 2026 16:40:28 +0000 by kriss37

How Custom Middleware Enters the ASP.NET Core Request Pipeline Execution Queue

How Custom Middleware Enters the ASP.NET Core Request Pipeline Execution Queue 1. Standard Implementation of a Custom Middleware Class public class RequestAuditMiddleware { private readonly RequestDelegate _nextDelegate; // 1. Constructor must accept RequestDelegate as a parameter public RequestAuditMiddleware(RequestDelegate n ...

Posted on Wed, 20 May 2026 21:14:27 +0000 by Natty_Dreadlock

Handling CORS in ASP.NET Core and IIS Environments

Configuring CORS via IIS web.config When hosting an ASP.NET Core application on Internet Information Services (IIS), you can manage Cross-Origin Resource Sharing (CORS) settings directly through the web.config file. This approach is effective when you want the web server to handle preflight requests and header injections before they reach the a ...

Posted on Thu, 14 May 2026 04:18:15 +0000 by blindSpot

Implementing Global Request Processing with Django Middleware

Middleware provides a way to process requests and responses globally in Django applications. Instead of decorating individual view functions, middleware allows centrailzed request handling with several hook points during the request/response cycle. Middleware Basics Middleware components are Python classes that implement specific methods Django ...

Posted on Mon, 11 May 2026 00:35:30 +0000 by ntjang

Understanding Interceptors in Java Spring Applications

Core Concepts of Interceptors In Spring applications, interceptors serve as middleware components designed to execute custom logic before or after HTTP requests are processed. Unlike Aspect-Oriented Programming (AOP), which targets method-level cross-cutting concerns, interceptors specifically focus on the request processing pipeline. Intercept ...

Posted on Sun, 10 May 2026 20:04:06 +0000 by garethj

Django Supplementary Features: Static Files, Middleware, Admin Customization, File Uploads, and Pagination

Static File Management Django applications use CSS, JavaScript, and image assets as static files. Grouping them in a dedicated directory simplifies maintainance. While static directories can live inside each app, placing common assets at the project root is usually cleaner. Locating Static Files Define the lookup directories in the project’s se ...

Posted on Sun, 10 May 2026 18:32:55 +0000 by plodos

Understanding Scrapy Start URLs and Downloader Middleware Configuration

How Scrapy Processes Start URLs The Scrapy engine handles initial URLs through the following sequence: Invokes start_requests and collects its return value Creates a iterator from the return value Iterates through results, calling __next__() on each item Places all generated request objects into the scheduler Source Implementation def start_r ...

Posted on Sat, 09 May 2026 12:51:31 +0000 by not_skeletor