No has entrat com a usuari. Pots registrar-te o entrar. Així podràs crear entrades o comentar-ne d'altres!
Gravatar
0

In staging environments of our websites we usually want to make everything private, but then external calls to our app, as for example paypal IPN calls, won't be able to reach us.

The solution is a simple nginx configuration:


server {
    listen 80;
    server_name staging.myapp.com;
    root /my_app_path/current/public;

    location / {
      auth_basic "Restricted";
      auth_basic_user_file basic_auths/pwd_file;
      passenger_enabled on;
      rails_env staging;
    }

    location /paypal_ipn {
      auth_basic off;
      passenger_enabled on;
      rails_env staging;
    }
}

This will hide everything behind the basic authenticated realm except for the /paypal_ipn url.


Tags


0 comentaris