CORS Proxy.
Find a file
2024-11-15 17:15:31 +01:00
proxy.php Initial CORS proxy configuration. 2024-11-15 17:07:21 +01:00
README.md Fix default nginx configuration. 2024-11-15 17:15:31 +01:00

CORS proxy

NGINX configuration

server
{
	listen 80;
	listen [::]:80;
	server_name corsproxy.website; # REPLACE THIS.
	
	root /path/to/CorsProxy; # REPLACE THIS.

	add_header Access-Control-Allow-Origin *;
	
	location /
	{
		try_files /proxy.php =404;
	}

	location ~ \.php$
	{
		try_files $uri $document_root$fastcgi_script_name =404;
		fastcgi_pass unix:/run/php-fpm/php-fpm.sock;
		fastcgi_index index.php;
		include fastcgi.conf;
	}

	access_log off;
	error_log /var/log/nginx/corsproxy.error.log;
}