All Projects → njgibbon → nicks-cors-test

njgibbon / nicks-cors-test

Licence: other
Simple HTML & JS Tool to quickly test CORS locally.

Programming Languages

HTML
75241 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to nicks-cors-test

Nelmiocorsbundle
The NelmioCorsBundle allows you to send Cross-Origin Resource Sharing headers with ACL-style per-URL configuration.
Stars: ✭ 1,615 (+2275%)
Mutual labels:  cors, cross-origin-resource-sharing
Microwebsrv2
The last Micro Web Server for IoTs (MicroPython) or large servers (CPython), that supports WebSockets, routes, template engine and with really optimized architecture (mem allocations, async I/Os). Ready for ESP32, STM32 on Pyboard, Pycom's chipsets (WiPy, LoPy, ...). Robust, efficient and documented!
Stars: ✭ 295 (+333.82%)
Mutual labels:  cors, https
Yandex.Music.Api
Client Yandex.Music.Api for Yandex.Music
Stars: ✭ 53 (-22.06%)
Mutual labels:  https
aiotunnel
HTTP tunnel on top of aiohttp and asyncio
Stars: ✭ 29 (-57.35%)
Mutual labels:  https
silverstripe-graphql-jwt
JWT Authentication for GraphQL
Stars: ✭ 17 (-75%)
Mutual labels:  cors
lua-resty-cors
It's the implement of CORS on OpenResty
Stars: ✭ 53 (-22.06%)
Mutual labels:  cors
nginx-cors-plus
A simple nginx proxy that you can put in front of any domain to enable CORS.
Stars: ✭ 32 (-52.94%)
Mutual labels:  cors
poop
Firefox extension that prevents sending Origin headers when they are least likely to be necessary, to protect your privacy.
Stars: ✭ 36 (-47.06%)
Mutual labels:  cors
django-template
The ultimate Django template: production ready Django 3.2 with Docker, HTTPS and CI/CD using Github actions ‎️‍🔥
Stars: ✭ 20 (-70.59%)
Mutual labels:  https
httpit
A rapid http(s) benchmark tool written in Go
Stars: ✭ 156 (+129.41%)
Mutual labels:  https
node-cors-client
A test application that helps illustrate CORS while both in a working state and a non-working state across simple and complex request scenarios.
Stars: ✭ 53 (-22.06%)
Mutual labels:  cors
TLS-Redirection
TLS Redirection
Stars: ✭ 109 (+60.29%)
Mutual labels:  https
httpz
Fat-free hardenable opportunistic encryption for Firefox
Stars: ✭ 60 (-11.76%)
Mutual labels:  https
GoRAT
GoRAT (Go Remote Access Tool) is an extremely powerful reverse shell, file server, and control plane using HTTPS reverse tunnels as a transport mechanism.
Stars: ✭ 34 (-50%)
Mutual labels:  https
restler
Restler is a beautiful and powerful Android app for quickly testing REST API anywhere and anytime.
Stars: ✭ 120 (+76.47%)
Mutual labels:  https
create-fastify-app
An utility that help you to generate or add plugin to your Fastify project
Stars: ✭ 53 (-22.06%)
Mutual labels:  cors
sslcontext-kickstart
🔐 A lightweight high level library for configuring a http client or server based on SSLContext or other properties such as TrustManager, KeyManager or Trusted Certificates to communicate over SSL TLS for one way authentication or two way authentication provided by the SSLFactory. Support for Java, Scala and Kotlin based clients with examples. Av…
Stars: ✭ 295 (+333.82%)
Mutual labels:  https
horse-cors
No description or website provided.
Stars: ✭ 31 (-54.41%)
Mutual labels:  cors
node-cors-server
A test application that helps illustrate CORS while both in a working state and a non-working state across simple and complex request scenarios.
Stars: ✭ 72 (+5.88%)
Mutual labels:  cors
http-requests
An HTTP client abstraction that provides a common interface to several different client implementations.
Stars: ✭ 22 (-67.65%)
Mutual labels:  https

nicks-cors-test

Simple HTML & JS Tool to quickly test CORS locally.

Blog

https://medium.com/pareture/simple-local-cors-test-tool-544f108311c5

CORS

Cross Origin Resource Sharing (CORS) is a simple and powerful mechanism which uses HTTP headers so that a server knows where a request is coming from and can choose whether or not to accept the request based on this.

Better information here: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS

The header which is provided as the argument is the ‘Origin’. This is set by the User-Agent (the thing that makes the request) and can not be overridden (security enforced).

The server with the resource uses the Access-Control-Allow-Origin header to allowlist particular domains or allow requests from all origins using the wildcard:

Access-Control-Allow-Origin: *

Tool

You can use this simple tool to test making CORS requests and examine the outcome.

  • The HTML file is simply a shell to call the Javascript function.
  • The JS file executes an AJAX request based on the values you adjust.

Guide

  • Download the files and open index.html in a browser. You will be faced with a blank screen and nothing else.
  • Open the browser tools: e.g Right-click > Inspect > Console.
  • Open main.js file in a text editor.
  • Adjust the url value depending on the resource you want to check, save main.js and refresh the browser.
    • Try https://google.com and you will see it has been blocked due to CORS.
    • Try https://api.github.com and you will see it is not blocked and the content will be output.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].