Please see: https://github.com/kevinSuttle/html-meta-tags, thanks for the idea @dandv!
Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/
| # Run me with: | |
| # | |
| # $ nginx -p /path/to/this/file/ -c nginx.conf | |
| # | |
| # All requests are then routed to authenticated user's index, so | |
| # | |
| # GET http://user:password@localhost/_search?q=* | |
| # | |
| # is rewritten to: | |
| # |
| // Live video stream management for HTML5 video. Uses FFMPEG to connect to H.264 camera stream, | |
| // Camera stream is remuxed to a MP4 stream for HTML5 video compatibility and segments are recorded for later playback | |
| var liveStream = function (req, resp) { // handle each client request by instantiating a new FFMPEG instance | |
| // For live streaming, create a fragmented MP4 file with empty moov (no seeking possible). | |
| var reqUrl = url.parse(req.url, true) | |
| var cameraName = typeof reqUrl.pathname === "string" ? reqUrl.pathname.substring(1) : undefined; | |
| if (cameraName) { | |
| try { | |
| cameraName = decodeURIComponent(cameraName); |
| # /code/railsapp/app/assets/javascripts/thing/app.js.coffee | |
| #= require angular/templates | |
| angular.module("thing", ["app.templates"]).value("appName", "thing") |
| $(function () { | |
| "use strict"; | |
| // for better performance - to avoid searching in DOM | |
| var content = $('#content'); | |
| var input = $('#input'); | |
| var status = $('#status'); | |
| // my color assigned by the server | |
| var myColor = false; |
| sudo kill -9 `ps aux | grep [r]esque | grep -v grep | cut -c 10-16` |
| if (req.method === 'OPTIONS') { | |
| console.log('!OPTIONS'); | |
| var headers = {}; | |
| // IE8 does not allow domains to be specified, just the * | |
| // headers["Access-Control-Allow-Origin"] = req.headers.origin; | |
| headers["Access-Control-Allow-Origin"] = "*"; | |
| headers["Access-Control-Allow-Methods"] = "POST, GET, PUT, DELETE, OPTIONS"; | |
| headers["Access-Control-Allow-Credentials"] = false; | |
| headers["Access-Control-Max-Age"] = '86400'; // 24 hours | |
| headers["Access-Control-Allow-Headers"] = "X-Requested-With, X-HTTP-Method-Override, Content-Type, Accept"; |