Skip to content

Commit

Permalink
Merge branch 'release/0.4.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisseto committed Jul 14, 2015
2 parents 537e683 + 1261adf commit 9be241e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions fakecas.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ func main() {
}

func login(w http.ResponseWriter, r *http.Request) {
w.Header().Add("Access-Control-Allow-Origin", "*")
redir, err := url.Parse(r.FormValue("service"))

if err != nil {
Expand All @@ -85,11 +86,13 @@ func login(w http.ResponseWriter, r *http.Request) {
}

func logout(w http.ResponseWriter, r *http.Request) {
w.Header().Add("Access-Control-Allow-Origin", "*")
fmt.Println("Logging out and redirecting to", r.FormValue("service"))
http.Redirect(w, r, r.FormValue("service"), http.StatusFound)
}

func serviceValidate(w http.ResponseWriter, r *http.Request) {
w.Header().Add("Access-Control-Allow-Origin", "*")

session, err := mgo.Dial(*databaseaddress)
if err != nil {
Expand Down Expand Up @@ -129,6 +132,7 @@ func serviceValidate(w http.ResponseWriter, r *http.Request) {
}

func oauth(w http.ResponseWriter, r *http.Request) {
w.Header().Add("Access-Control-Allow-Origin", "*")

session, err := mgo.Dial(*databaseaddress)
if err != nil {
Expand Down

0 comments on commit 9be241e

Please sign in to comment.