Skip to main content

Posts

Showing posts with the label rest api

Securing application from vulnerable inputs through middleware in dotnet core

Securing Applications with ASP.NET Core OWIN Middleware Against Payload Attacks Introduction:  Cybersecurity is a crucial aspect of modern application development. One area of concern is preventing attacks that exploit vulnerabilities in request payloads. This article explores how to use ASP.NET Core OWIN middleware to enhance the security of your applications by addressing payload-based attacks. Vulnerability:  Payload Attacks Payload attacks involve sending malicious data in the request payload to exploit vulnerabilities. These attacks can lead to various security breaches, including data exposure, injection attacks, and remote code execution. Using OWIN Middleware:  ASP.NET Core provides the OWIN (Open Web Interface for .NET) middleware pipeline, which can be customized to intercept and process requests before they reach the application's core logic. This provides an opportunity to implement security measures. Sample Code Implementing Payload Inspection Middleware: Here'

Download CSV file using JavaScript fetch API

Downloading a CSV File from an API Using JavaScript Fetch API: A Step-by-Step Guide Introduction: Downloading files from an API is a common task in web development. This article walks you through the process of downloading a CSV file from an API using the Fetch API in JavaScript. We'll cover the basics of making API requests and handling file downloads, complete with a sample code snippet. Prerequisites: Ensure you have a basic understanding of JavaScript and web APIs. No additional libraries are required for this tutorial. Step 1: Creating the HTML Structure: Start by creating a simple HTML structure that includes a button to initiate the file download. <!DOCTYPE html> < html lang = "en" > < head > < meta charset = "UTF-8" > < meta name = "viewport" content = "width=device-width, initial-scale=1.0" > < title > CSV File Download </ title > </ head > < body >

Migrating from Springfox to OpenAPI 3 in spring boot Java

Migrating from Springfox to OpenAPI 3 in Spring Boot Application This blogpost, I would like to share about the migration to OpenAPI 3 in my project application that is built using Java 8 and Spring boot.  I was working in a project that had a very old framework support and JDK. I was taking my free time whenever I find one and then did some upgrade to the core so as to get the application to be on the latest frameworks and get support if any issues. Why Upgrade? The reason for upgrade is to facilitate the following The application dependencies are up-to-date, meaning that when we face any issue or require any help, people will be able to help (Community support). Though we have support for the deprecated frameworks also from the vibrant community like Stackoverflow.com, better to be with the upgrades There might be limitations hindering in building new functionality or extending existing ones with the older versions, so a version upgrade to the latest will be always handy