Compare commits
2 Commits
eec4b1b19e
...
45aef0b637
Author | SHA1 | Date | |
---|---|---|---|
45aef0b637 | |||
f17dac8542 |
3
main.go
3
main.go
@ -30,6 +30,7 @@ func Serve(w http.ResponseWriter, r *http.Request) {
|
|||||||
<head>
|
<head>
|
||||||
<title>` + title + `</title>
|
<title>` + title + `</title>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||||
|
<meta name="robots" content="noindex, nofollow">
|
||||||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha384-HSMxcRTRxnN+Bdg0JdbxYKrThecOKuH5zCYotlSAcp1+c8xmyTe9GYg1l9a69psu" crossorigin="anonymous">
|
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha384-HSMxcRTRxnN+Bdg0JdbxYKrThecOKuH5zCYotlSAcp1+c8xmyTe9GYg1l9a69psu" crossorigin="anonymous">
|
||||||
<style>.table > tbody > tr > th, .table > tbody > tr > td { vertical-align: middle; }
|
<style>.table > tbody > tr > th, .table > tbody > tr > td { vertical-align: middle; }
|
||||||
td.danger { text-align: center; }
|
td.danger { text-align: center; }
|
||||||
@ -196,6 +197,8 @@ func ServeJSONStudent(w http.ResponseWriter, r *http.Request) {
|
|||||||
log.Printf("Handling %s request from %s: %s [%s]\n", r.Method, r.RemoteAddr, r.URL.Path, r.UserAgent())
|
log.Printf("Handling %s request from %s: %s [%s]\n", r.Method, r.RemoteAddr, r.URL.Path, r.UserAgent())
|
||||||
|
|
||||||
w.Header().Set("Content-Type", "application/json")
|
w.Header().Set("Content-Type", "application/json")
|
||||||
|
w.Header().Set("Access-Control-Allow-Origin", "*")
|
||||||
|
w.Header().Set("Access-Control-Allow-Methods", "GET, OPTIONS")
|
||||||
|
|
||||||
login := strings.TrimSuffix(strings.TrimPrefix(r.URL.Path, "/"), ".json")
|
login := strings.TrimSuffix(strings.TrimPrefix(r.URL.Path, "/"), ".json")
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user