This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| apt-get -y update | |
| apt-get -y install nginx-extras build-essential libpcre3-dev libssl-dev libgeoip-dev libpq-dev libxslt1-dev libgd2-xpm-dev | |
| wget -c https://openresty.org/download/openresty-1.11.2.2.tar.gz | |
| tar zxvf openresty-1.11.2.2.tar.gz | |
| cd openresty-1.11.2.2 | |
| # If message: you need to have ldconfig in your PATH env when enabling luajit. | |
| #export PATH=$PATH:/sbin |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| http { | |
| log_format bodylog '$remote_addr - $remote_user [$time_local] ' | |
| '"$request" $status $body_bytes_sent ' | |
| '"$http_referer" "$http_user_agent" $request_time ' | |
| '<"$request_body" >"$resp_body"'; | |
| lua_need_request_body on; | |
| set $resp_body ""; | |
| body_filter_by_lua ' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Injectable } from '@angular/core'; | |
| import { CanActivate, Router } from '@angular/router'; | |
| import { FirebaseAuth, FirebaseAuthState } from 'angularfire2'; | |
| import { Observable } from 'rxjs/Observable'; | |
| @Injectable() | |
| export class AuthGuard implements CanActivate { | |
| constructor(private auth: FirebaseAuth, private router: Router) { } |