This script is a simple tool to test if server allows cross-origin resource sharing (CORS), i.e. if server allows requests from some domain.
Download script to ~/.local/bin/cors_test.sh
wget -P ~/.local/bin https://gist.githubusercontent.com/vlazic/9807583e155560d2917bebb8ff99cd9f/raw/e22e82e84f38437bd85b6f8aa09bb172eeb8e439/cors_test.sh
chmod +x ~/.local/bin/cors_test.sh
You can use this script as a standalone tool.
There are two arguments:
- Origin of request (frontend app)
- Destination url (server)
cors_test.sh http://localhost https://example.com
MIT