cookie for session

This commit is contained in:
Ludy87 2025-03-27 18:38:39 +01:00
parent ec2caa4134
commit 0154e46c8a
No known key found for this signature in database
GPG Key ID: 92696155E0220F94
3 changed files with 40 additions and 39 deletions
src/main/java/stirling/software/SPDF/config
testing

@ -49,9 +49,7 @@ public class EndpointInterceptor implements HandlerInterceptor {
|| request.getRequestURI().contains("/images/")
|| request.getRequestURI().contains("/favicon")
|| request.getRequestURI().contains("/error")
|| request.getRequestURI().contains("/session/status")
|| request.getRequestURI().contains("/session/expire")
|| request.getRequestURI().contains("/session/expire/")
|| request.getRequestURI().contains("/session")
|| request.getRequestURI().endsWith(".js")
|| request.getRequestURI().endsWith(".png")
|| request.getRequestURI().endsWith(".webmanifest")

@ -212,8 +212,8 @@ main() {
cd "$PROJECT_ROOT"
export DOCKER_CLI_EXPERIMENTAL=enabled
export COMPOSE_DOCKER_CLI_BUILD=0
export DOCKER_CLI_EXPERIMENTAL=enabled
export COMPOSE_DOCKER_CLI_BUILD=0
export DOCKER_ENABLE_SECURITY=false
# Run the gradlew build command and check if it fails
if ! ./gradlew clean build; then

@ -9,7 +9,7 @@ check_webpage() {
local result_file="$3"
# Use curl to fetch the page with timeout
response=$(curl -s -w "\n%{http_code}" --max-time $timeout "$full_url")
response=$(curl -b cookies.txt -s -w "\n%{http_code}" --max-time $timeout "$full_url")
if [ $? -ne 0 ]; then
echo "FAILED - Connection error or timeout $full_url" >> "$result_file"
return 1
@ -158,6 +158,9 @@ main() {
exit 1
fi
curl -s $base_url/session/expire/all
curl -s -c cookies.txt $base_url/session
# Run tests using the URL list
if test_all_urls "$url_file" "$base_url" "$max_parallel"; then
echo "All webpage tests passed!"