package com.eactive.testmaster.config;

import java.util.Collections;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import org.springframework.stereotype.Service;

@Service
public class CsrfExclusionService {
    private Set<String> excludedPaths = Collections.newSetFromMap(new ConcurrentHashMap<>());

    public void addExcludedPath(String path) {
        excludedPaths.add(path);
    }

    public void removeExcludedPath(String path) {
        excludedPaths.remove(path);
    }

    public boolean shouldExclude(String path) {
        return excludedPaths.contains(path);
    }
}
