###Edit this file
/etc/nginx/nginx.conf
###Add this line anywhere inside the http { }
block:
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
###Go to your Forge panel and restart Nginx
###Edit this file
/etc/nginx/nginx.conf
###Add this line anywhere inside the http { }
block:
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
###Go to your Forge panel and restart Nginx
<?php | |
/* | |
* Place this with the rest of your rules. | |
* Doesn't need to be in an array as there are no pipes. | |
* Password is required with a minimum of 6 characters | |
* Should have at least 1 lowercase AND 1 uppercase AND 1 number | |
*/ | |
$rules = [ | |
'password' => 'required|min:6|regex:/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d).+$/' | |
]; |
<?php namespace App\Http\Middleware; | |
use Closure; | |
use Illuminate\Contracts\Routing\Middleware; | |
use Illuminate\Http\Response; | |
class CORS implements Middleware { | |
/** | |
* Handle an incoming request. |
failed (104: Connection reset by peer) while reading response header from upstream, client: | |
If you are getting the above error in nginx logs running in from of upstream servers you may consider doing this as it worked for me: | |
check the ulimit on the machines and ensure it is high enough to handle the load coming in. 'ulimit' on linux, I am told determines the maximum number of open files the kernel can handle. | |
The way I did that? | |
modifying limits: for open files: | |
-------------------------------- | |
add or change this line in /etc/systcl.conf | |
fs.file-max = <limit-number> |
Most apps should eventually have two or three sets of test suites: Unit tests, integration tests, and functional tests.
A note about examples:
We'll be using ES6 syntax just for reading simplicity. () =>
means function
, let
is block-scoped var
(used here just to remind the reader that we're talking about ES6), and (...args)
creates an args
array containing all the arguments that follow the ...
.
/** | |
* A Connection handler for Amazon ES. | |
* | |
* Uses the aws-sdk to make signed requests to an Amazon ES endpoint. | |
* Define the Amazon ES config and the connection handler | |
* in the client configuration: | |
* | |
* var es = require('elasticsearch').Client({ | |
* hosts: 'https://amazon-es-host.us-east-1.es.amazonaws.com', | |
* connectionClass: require('http-aws-es'), |