Try these rules:
(in www.domain.com's server block)
rewrite ^/$ http://domain.com permanent break;
rewrite ^/main(.*)$ http://domain.com$1 permanent break;
def sign_data(private_key_loc, data): | |
''' | |
param: private_key_loc Path to your private key | |
param: package Data to be signed | |
return: base64 encoded signature | |
''' | |
from Crypto.PublicKey import RSA | |
from Crypto.Signature import PKCS1_v1_5 | |
from Crypto.Hash import SHA256 | |
from base64 import b64encode, b64decode |
def verify_sign(public_key_loc, signature, data): | |
''' | |
Verifies with a public key from whom the data came that it was indeed | |
signed by their private key | |
param: public_key_loc Path to public key | |
param: signature String signature to be verified | |
return: Boolean. True if the signature is valid; False otherwise. | |
''' | |
from Crypto.PublicKey import RSA | |
from Crypto.Signature import PKCS1_v1_5 |
# | |
# CORS header support | |
# | |
# One way to use this is by placing it into a file called "cors_support" | |
# under your Nginx configuration directory and placing the following | |
# statement inside your **location** block(s): | |
# | |
# include cors_support; | |
# | |
# As of Nginx 1.7.5, add_header supports an "always" parameter which |
Try these rules:
(in www.domain.com's server block)
rewrite ^/$ http://domain.com permanent break;
rewrite ^/main(.*)$ http://domain.com$1 permanent break;
Put the following directives in your server
block. nginx will then redirect URLs with double (or triple or multiple) slashes to the corresponding URL with a single slash.
merge_slashes off;
rewrite ^(.*?)//+(.*?)$ $1/$2 permanent;
Docker is available for Linux, MacOS, and Windows.
Docker for Mac is best installed with Homebrew and Homebrew Cask. For other ways to install on MacOS, see Install Docker for Mac in Docker's docs.
brew cask install docker # Install Docker
sudo wget https://builds.wkhtmltopdf.org/0.12.1.3/wkhtmltox_0.12.1.3-1~bionic_amd64.deb | |
sudo dpkg -i wkhtmltox_0.12.1.3-1~bionic_amd64.deb | |
sudo apt-get install -f | |
sudo ln -s /usr/local/bin/wkhtmltopdf /usr/bin | |
sudo ln -s /usr/local/bin/wkhtmltoimage /usr/bin |