Fix: Rate Limit y Variables para Testeos Locales
This commit is contained in:
@@ -34,8 +34,8 @@ public class AuthController : ControllerBase
|
||||
{
|
||||
HttpOnly = true, // Seguridad: JS no puede leer esto
|
||||
Expires = DateTime.UtcNow.AddMinutes(15),
|
||||
Secure = true, // Solo HTTPS (localhost con https cuenta)
|
||||
SameSite = SameSiteMode.Strict,
|
||||
Secure = false, // Solo HTTPS (Para tests locales 'Secure = false' temporalmente)
|
||||
SameSite = SameSiteMode.Lax, // Protección CSRF (Strict para máxima seguridad, pero puede ser Lax si hay problemas con redirecciones y testeos locales)
|
||||
IsEssential = true
|
||||
};
|
||||
Response.Cookies.Append(cookieName, token, cookieOptions);
|
||||
|
||||
@@ -3,7 +3,7 @@ import { AdsV2Service } from '../services/ads.v2.service';
|
||||
import { AdminService } from '../services/admin.service';
|
||||
import { ChatService, type ChatMessage } from '../services/chat.service';
|
||||
import { getImageUrl, formatCurrency, parseUTCDate } from '../utils/app.utils';
|
||||
import { AuthService } from '../services/auth.service';
|
||||
|
||||
import {
|
||||
VEHICLE_TYPES,
|
||||
AUTO_SEGMENTS,
|
||||
@@ -14,6 +14,7 @@ import {
|
||||
VEHICLE_CONDITIONS,
|
||||
STEERING_TYPES
|
||||
} from '../constants/vehicleOptions';
|
||||
import { useAuth } from '../context/AuthContext';
|
||||
|
||||
interface Props {
|
||||
adSummary: any;
|
||||
@@ -44,7 +45,8 @@ export default function ModerationModal({ adSummary, onClose, onApprove }: Props
|
||||
const [photosToDelete, setPhotosToDelete] = useState<number[]>([]);
|
||||
const [newPhotos, setNewPhotos] = useState<File[]>([]);
|
||||
|
||||
const adminUser = AuthService.getCurrentUser();
|
||||
const { user: adminUser } = useAuth();
|
||||
//const adminUser = AuthService.getCurrentUser();
|
||||
const scrollRef = useRef<HTMLDivElement>(null);
|
||||
|
||||
// 🟢 HELPER ROBUSTO PARA IDs: Busca en todas las variantes de casing posibles
|
||||
@@ -102,7 +104,7 @@ export default function ModerationModal({ adSummary, onClose, onApprove }: Props
|
||||
fetchData();
|
||||
const interval = setInterval(loadChat, 5000);
|
||||
return () => clearInterval(interval);
|
||||
}, [adSummary, adminUser]);
|
||||
}, [adSummary?.adID, adSummary?.AdID, adminUser?.id]);
|
||||
|
||||
useEffect(() => {
|
||||
if (scrollRef.current) scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
|
||||
|
||||
@@ -82,7 +82,7 @@ export default function ExplorarPage() {
|
||||
|
||||
fetchListings();
|
||||
if (showMobileFilters) setShowMobileFilters(false);
|
||||
}, [searchParams]);
|
||||
}, [searchParams.toString()]);
|
||||
|
||||
const applyFilters = () => {
|
||||
const newParams = new URLSearchParams(searchParams);
|
||||
|
||||
Reference in New Issue
Block a user