How to Handle Errors and Send Emails in Case of Exceptions in FastAPI

How to Handle Errors and Send Emails in Case of Exceptions in FastAPI

Tiempo de lectura: 2 minutos In FastAPI development with Python, proper error handling is crucial to ensure smooth operation. In this tutorial, we will learn to implement an exception handling system that will automatically send an email to the administrator when an error occurs in our API. Step 1: Setting up the handler.py File Firstly, we will create a file … Read more

Notify by email of 500 errors or exceptions with PHP

Notify by email of 500 errors or exceptions with PHP

Tiempo de lectura: 2 minutos When developing web applications in PHP, it is essential to handle errors effectively to ensure a smooth user experience and to promptly notify system administrators of any issues. In this tutorial, we will learn how to implement a basic exception handling system that will automatically send an email to the administrator when a 500 error … Read more

Clean up unused Docker image space

Clean up unused Docker image space

Tiempo de lectura: < 1 minuto Today we will learn how to free up disk space from unused images with Docker. Before cleaning the images, you can use the following command to see how much space can be freed: docker system df This command will display a summary of the space used by different Docker resource categories, such as images, containers, … Read more

Create a terms of use acceptance widget with Flutter

Create a terms of use acceptance widget with Flutter

Tiempo de lectura: 2 minutos Today we are going to learn how to create a Widget that allows us to accept the terms of use of the system before registering on the platform. The first thing we are going to do is create this widget, which we will call condiciones_uso.dart import ‘package:flutter/material.dart’; class CondicionesUso extends StatefulWidget { CondicionesUso ({Key? key}) … Read more

Create a Redirection with Nginx Proxy Manager

Create a Redirection with Nginx Proxy Manager

Tiempo de lectura: < 1 minuto Today, we are going to learn how to create a redirection with Nginx Proxy Manager. Let’s assume that we want to redirect all traffic coming from myweb.com to www.myweb.com. First, we need to create our domain named myweb.com within Proxy Host: Now, open it and go to the Advanced section: And add the following within … Read more

Menu in HTML, CSS, and JavaScript

Tiempo de lectura: 2 minutos To create a horizontal menu with different options that change content based on the selected option, follow these steps. First, create an unordered list (<ul>) representing your menu and give it some styles to remove bullets and set a dark background. Each list item (<li>) represents a menu option and is floated left (float: left) … Read more

How to Create a Middleware to Retrieve X-REAL-IP and X-Forwarded-For in HTTP Calls with Node.js and Express

How to Create a Middleware to Retrieve X-REAL-IP and X-Forwarded-For in HTTP Calls with Node.js and Express

Tiempo de lectura: 2 minutos html Copy code In Node.js, you can use middlewares in Express.js to customize the handling of HTTP requests before or after they reach the routes. In this tutorial, you will learn how to create a middleware that extracts the X-REAL-IP and x-forwarded-for headers from incoming HTTP calls in your Express application. Prerequisites: Node.js installed on … Read more

How to Create an Interceptor or Middleware to Obtain X-REAL-IP and X-Forwarded-For in Calls with FAST-API

How to Create an Interceptor or Middleware to Obtain X-REAL-IP and X-Forwarded-For in Calls with FAST-API

Tiempo de lectura: 2 minutos Hello, today I bring you a tutorial on how to create an interceptor or middleware in FastAPI to obtain the X-REAL-IP and X-Forwarded-For headers in API calls: Introduction In FastAPI, interceptors (middlewares) are a powerful tool that allows you to customize the handling of HTTP requests before or after they reach the route handlers. In … Read more