Catster
-------
A simple django application to that shows cute cats purring only on ipv6.
Users trying to view purring cats via ipv4 will be shown a message that the
website only serves cats to ipv6 client.
To view the application first install the dependencies:
```
make install-deps
```
To run application:
```
make server
```
To run the tests:
```
make tests
```
## Notes:
While this is solved with django mechanism. The "ipv4 only" page can simply be
served with nginx listening on 0.0.0.0 and serving a static page, while another
server directive can listen on ipv6 and transfer the traffic to the uwsgi server.
```
server {
listen [::]:80 ipv6only=on;
server_name catster.info;
location / {
root /var/www/localhost/;
index index.html index.htm;
}
}
server {
listen 0.0.0.0:80;
server_name catster.info;
location / {
root /var/www/localhost/nocats;
index index.html index.htm;
}
}
```
Another approach using nginx is also demonstrated in the ungleich blog ...
https://ungleich.ch/en-us/cms/blog/2019/01/27/how-to-distinguish-ipv6-and-ipv4-traffic-with-nginx/