GithubHelp home page GithubHelp logo

smartgic / ovos-api Goto Github PK

View Code? Open in Web Editor NEW
8.0 1.0 4.0 691 KB

Expose a secure REST API on top of Open Voice OS to perform actions on your instance without to SSH into it.

Home Page: https://hub.docker.com/r/smartgic/mycroft-api

License: MIT License

Python 99.07% Dockerfile 0.93%
rest api rest-api mycroft python docker jwt jwt-authentication python3 postman

ovos-api's People

Contributors

goldyfruit avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

ovos-api's Issues

Add Nginx virtualhost example

Nginx example with TLS support should be added to the documentation.

20-api.domain.io.conf

server {
        listen         80;
	server_name    api.domain.io;

        root /srv/data/web/api.domain.io;
        index index.html index.htm index.php;

	location /.well-known/acme-challenge/ {
		try_files $uri /dev/null =404;
	}

        location / {
		return 301 https://$host$request_uri;
        }

	access_log /srv/data/logs/web/api.domain.io/access-80.log;
	error_log /srv/data/logs/web/api.domain.io/error-80.log;
}

server {
	listen 443 ssl http2;
	server_name api.domain.io;

       	root /srv/data/web/api.domain.io;
	index index.html index.htm index.php;

	include snippets/ssl-api.domain.io.conf;
	include snippets/ssl-params.conf;

	location / {
		proxy_pass		http://10.22.56.1:8100;
		proxy_redirect		off;
		proxy_set_header	Host            $host;
		proxy_set_header	X-Real-IP       $remote_addr;
		proxy_set_header	X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_set_header        X-Forwarded-Proto $scheme;
	}

	access_log /srv/data/logs/web/api.domain.io/access-443.log;
	error_log /srv/data/logs/web/api.domain.io/error-443.log;
}

ssl-params.conf

ssl_certificate /etc/letsencrypt/live/api.domain.io/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/api.domain.io/privkey.pem;

ssl-api.domain.io.conf

# from https://cipherli.st/
# and https://raymii.org/s/tutorials/Strong_SSL_Security_On_nginx.html

ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH";
ssl_ecdh_curve secp384r1;
ssl_session_cache shared:SSL:10m;
ssl_session_tickets off;
ssl_stapling on;
ssl_stapling_verify on;
ssl_dhparam /etc/ssl/certs/dhparam.pem;

resolver 8.8.8.8 8.8.4.4 valid=300s;
resolver_timeout 5s;

# Disable preloading HSTS for now.  You can use the commented out header line that includes
# the "preload" directive if you understand the implications.
#add_header Strict-Transport-Security "max-age=63072000; includeSubdomains; preload";
add_header Strict-Transport-Security "max-age=63072000; includeSubdomains";
add_header X-Frame-Options sameorigin;
add_header X-Content-Type-Options nosniff;

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.