Setup dynamic session timing & regeneration/setup flows tied to DoRequest

This commit is contained in:
2024-03-01 00:51:38 -06:00
parent e2bf31cb33
commit a0edff1e9d
3 changed files with 65 additions and 19 deletions

View File

@@ -129,6 +129,11 @@ func DoRequest(req *http.Request) (*http.Response, error) {
contentLengthHeader := res.Header.Get("Content-Length")
contentLength := int64(-1)
// If this request was a Banner API request, reset the session timer
if strings.HasPrefix(req.URL.Path, "StudentRegistrationSsb/ssb/classSearch/") {
ResetSessionTimer()
}
// Get the content length
if contentLengthHeader != "" {
contentLength, err = strconv.ParseInt(contentLengthHeader, 10, 64)