on master help sign in
Update README.md

Adds information about joining the hallway and setting up CORS

commite0b6b08fb00f1e411bfc1ef2a43b581dba6d869d authorGaeel Bradshaw-Rodriguez <gaeel@nanoleptic.net> dateWed 3 Jul 2019, 13:24 (7 years ago) parentd7f0e3f
1 file changed+21−1
README.md+21−1
README.md+21−1
@@ -9,7 +9,7 @@ This [webring](https://wiki.xxiivv.com/webring) is an attempt to inspire artists
99```
1010
1111- Add the webring icon to your website html.
12−- Add your website information to the [sites.js](https://github.com/XXIIVV/webring/edit/master/scripts/sites.js) file. The `url` key is required, but you can also include `title`, `type`, `author`, `contact`, and `rss`.
12+- Add your website information to the [sites.js](https://github.com/XXIIVV/webring/edit/master/scripts/sites.js) file. The `url` key is required, but you can also include `title`, `type`, `author`, `contact`, `rss`, and `feed`.
1313- Submit a Pull Request with **the location of the webring icon** on your site.
1414
1515Alternatively, if you your website has a dark background, use `icon.white.svg`. If your website is complaining about *https*, go ahead and host the icon yourself. **Single page websites, and websites acting only as portals to other social platforms, will be rejected**.
@@ -22,6 +22,26 @@ Instead of linking to the directory, you can also link to the next link in the r
2222<a href='https://webring.xxiivv.com/#wiki.xxiivv' target='_blank' rel="noopener noreferrer"><img src='https://webring.xxiivv.com/icon.black.svg'/></a>
2323```
2424
25+### Joining the hallway
26+
27+[The Hallway](https://webring.xxiivv.com/hallway.html) is a decentralized forum using [twtxt](https://twtxt.readthedocs.io/en/stable/user/twtxtfile.html) feeds.
28+
29+To join, create a twtxt text file, and add its URL to your webring entry under `feed`.
30+This file needs to be accessible via CORS, so if you're self-hosting, please make sure to allow the `webring.xxiivv.com` origin.
31+Here's an example of how to do so with Nginx:
32+```
33+location / {
34+ index index.html;
35+ if ($request_method = 'GET') {
36+ add_header 'Access-Control-Allow-Origin' 'https://webring.xxiivv.com';
37+ add_header 'Access-Control-Allow-Methods' 'GET';
38+ add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range';
39+ add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range';
40+ }
41+}
42+```
43+You don't need to allow all origins nor allow any other methods rather than GET, doing so can harm the security of your website, please read about [Cross-Origin Resource Sharing](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) if you intend to do anything more complicated.
44+
2545## API
2646
2747This repository does not contain mature API capabilities, but there are a couple ways to request a list of sites and other information currently in the webring.