This example is part of this article.
This is an example for an HLS delivery with basic security. Nginx compiled with nginx-rtmp-module & secure-link is used as media server. Features:
- Domain filtering
- Referrer filtering
- Embed buster
#!/bin/bash | |
# 🚀 Discover More: Testing Your Firewall in 60 Seconds: A Lightweight WAF Testing Script That Anyone Can Use | |
# Learn how this script works and the best practices for WAF testing. | |
# Read the full article here: | |
# 👉 https://medium.com/@kochuraa/testing-your-firewall-in-60-seconds-a-lightweight-waf-testing-script-that-anyone-can-use-a7a725fefcb7 | |
# Safe WAF Tester Script | |
# Usage: ./waf-smoke-test.sh <URL> [-o output.md] [-H "Header: Value"] | |
# Examples: |
This example is part of this article.
This is an example for an HLS delivery with basic security. Nginx compiled with nginx-rtmp-module & secure-link is used as media server. Features:
For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.
Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon
with HyperThreading enabled, but it can work without problem on slower machines.
You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.
$(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; |
Here, I introduce 2 scripts for uploading files to Slack using Node.js as samples. These 2 sample scripts are for uploading files to Slack.
form-data
.boundary
using Buffer.concat()
.upstream upstream-nodejs { | |
server 127.0.0.1:3000; | |
} | |
server { | |
listen 80; | |
server_name mydomain.com www.mydomain.com; | |
rewrite ^(.*) https://$host$1 permanent; | |
} |
server { | |
listen 80; | |
server_name craftypixels.com; | |
location / { | |
proxy_pass http://localhost:3000; | |
proxy_http_version 1.1; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection 'upgrade'; | |
proxy_set_header Host $host; | |
proxy_cache_bypass $http_upgrade; |
<Virtualhost> | |
ServerName craftypixels.com | |
ProxyPreserveHost on | |
ProxyPass /blog ! | |
ProxyPass / http://localhost:3000/ | |
ProxyPassReverse / http://localhost:3000/ | |
alias /blog /var/www/craftypixels/blog | |
DocumentRoot /var/www/craftypixels/blog/ | |
Options -Indexes |