How to Test Whether CORS Is Properly Enabled on a Website

With Cross-Origin Resource Sharing (hereafter CORS) settings, JavaScript can get past the browser’s same-origin policy and access resources (APIs) on other domains. But every time I set up CORS, I have a headache working out whether the server was really configured successfully. Sometimes the browser caches CORS results, so even when the server is configured correctly, the request keeps failing no matter how many times you refresh the page. Here I will show you how to use cURL to inspect the headers directly and check whether CORS is enabled! ...

January 4, 2017 · 1 min

[PHP] Getting the Real Download URLs of Wretch/Yam Music with curl-lib

  The UI I designed is clean^^ This program, getting the real download URLs of Wretch/Yam music, was originally going to become a program that automatically generates blog music code. But since many people already run music code generators, one more wouldn't make much of a difference. So instead of building it, I decided to release the code for everyone to look at. Also, if anyone needs to download music from Yam or Wretch, they can download the program, install it on their own server, and run it there....

January 25, 2011 · 3 min