Category: Webservers

.htaccess – negative file type match

Here’s an example of how to block all files extensions not listed in the regular expression:

 

Read More »

Disable OPTIONS method in NGINX

To disable the OPTIONS method in Nginx add the following config:

The result can be tested with curl:

 

Read More »

Test CORS with curl

Is your CDN returning the proper CORS headers? One way to test is with curl. Here’s a simple CORS request:

You should get a successful response that includes and “Access-Control-Allow-Origin” header. And here’s a pre-flight request:

You should

Read More »

Mixing Basic Auth And IP Access Controls

In some cases you might want to require HTTP Basic authentication to a site but allow specific IP addresses to skip the username/password. For Apache this can be configured with:

For nginx the configuration is:

     

Read More »

Get a free consultation from Reliable Penguin

Submit the form—or for immediate service call 866-649-7984.