Skip to content

Commit

Permalink
help
Browse files Browse the repository at this point in the history
  • Loading branch information
sshiiden committed Jan 30, 2025
1 parent f09635d commit ea12144
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"path/filepath"
"strconv"
"strings"
"time"

"github.com/PuerkitoBio/goquery"
"github.com/gorilla/mux"
Expand Down Expand Up @@ -276,7 +277,6 @@ func BlogHandler(w http.ResponseWriter, r *http.Request) {
if err != nil {
log.Fatalf("failed to create request: %v", err)
}
req.Header.Set("User-Agent", "sddf;lkjaa;fjoiwneg;lsaidfgj;oirwaengpuioear;nearoiptiuhdaspf;goin")

client := &http.Client{
Transport: &http3.Transport{},
Expand Down Expand Up @@ -342,7 +342,6 @@ func BlogArticleHandler(w http.ResponseWriter, r *http.Request) {
if err != nil {
log.Fatalf("failed to create request: %v", err)
}
req.Header.Set("User-Agent", "sddf;lkjaa;fjoiwneg;lsaidfgj;oirwaengpuioear;nearoiptiuhdaspf;goin")

client := &http.Client{
Transport: &http3.Transport{},
Expand Down Expand Up @@ -634,5 +633,13 @@ func main() {

// Start the server
fmt.Println("Starting server on :8080")
log.Fatal(http.ListenAndServe(":8080", corsHandler))
// log.Fatal(http.ListenAndServe(":8080", corsHandler))
srv := &http.Server{
Addr: ":8080",
Handler: corsHandler,
ReadTimeout: 60 * time.Second,
WriteTimeout: 60 * time.Second,
IdleTimeout: 60 * time.Second,
}
log.Fatal(srv.ListenAndServe())
}

0 comments on commit ea12144

Please sign in to comment.