Skip to content

prayerie/moyachat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is a basic Pictochat-themed chatroom widget for a website.

I made this for my personal website, so it may be difficult to use in its current state as it is half refactored.

Basic support for mutliple rooms is supported. Supply your desired room name in the query string.

https://yourcooldomain.info/chat?room=charoom1

Usage

pip install -r requirements.txt

Testing

flask --app chat run (if you actually intend to use this please put it behind a reverse proxy and run it with gunicorn):

gunicorn -w 1 --worker-class eventlet chat:app -b 127.0.0.1:5000

If you are using Nginx, set up the appropriate rules:

location /chat {
  proxy_pass http://127.0.0.1:5000/
  ...
}

location /socket.io {
  proxy_pass http://127.0.0.1:5000/socket.io/
  ...
}

Special considerations need to be made if iframe embedding on another (sub)domain. You will need to set Content-Security-Policy, and some others:

server {
  ...
  add_header X-Frame-Options "ALLOW-FROM https://yourothercoolwebsite.net" always;
  add_header Content-Security-Policy "frame-ancestors 'self' https://www.yourothercoolwebsite.net https://yourothercoolwebsite.net;" always;

  ...
}

The above will probably be sufficient.

About

Realtime Pictochat-themed chatroom widget

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages