mirror of
https://github.com/maelgangloff/domain-watchdog.git
synced 2025-12-29 16:15:04 +00:00
fix: cookie expiration date same as the token
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import React, {useEffect, useState} from "react";
|
||||
import {Card, Divider, Flex, Form, message} from "antd";
|
||||
import {EventAction, getWatchlists, putWatchlist, postWatchlist} from "../../utils/api";
|
||||
import {EventAction, getWatchlists, postWatchlist, putWatchlist} from "../../utils/api";
|
||||
import {AxiosError} from "axios";
|
||||
import {t} from 'ttag'
|
||||
import {WatchlistForm} from "../../components/tracking/watchlist/WatchlistForm";
|
||||
@@ -35,7 +35,7 @@ export default function WatchlistPage() {
|
||||
emailTriggers: string[]
|
||||
connector?: string
|
||||
}) => {
|
||||
const domainsURI = values.domains.map(d => '/api/domains/' + d)
|
||||
const domainsURI = values.domains.map(d => '/api/domains/' + d.toLowerCase())
|
||||
postWatchlist({
|
||||
name: values.name,
|
||||
domains: domainsURI,
|
||||
@@ -57,7 +57,7 @@ export default function WatchlistPage() {
|
||||
emailTriggers: string[]
|
||||
connector?: string
|
||||
}) => {
|
||||
const domainsURI = values.domains.map(d => '/api/domains/' + d)
|
||||
const domainsURI = values.domains.map(d => '/api/domains/' + d.toLowerCase())
|
||||
|
||||
return putWatchlist({
|
||||
token: values.token,
|
||||
|
||||
@@ -43,7 +43,7 @@ class JWTAuthenticator implements AuthenticationSuccessHandlerInterface
|
||||
new Cookie(
|
||||
'BEARER',
|
||||
$jwt,
|
||||
time() + 7200, // expiration
|
||||
time() + 604800, // expiration
|
||||
'/',
|
||||
null,
|
||||
true,
|
||||
|
||||
@@ -75,7 +75,7 @@ class OAuthAuthenticator extends OAuth2Authenticator implements AuthenticationEn
|
||||
new Cookie(
|
||||
'BEARER',
|
||||
$token,
|
||||
time() + 7200, // expiration
|
||||
time() + 604800, // expiration
|
||||
'/',
|
||||
null,
|
||||
true,
|
||||
|
||||
Reference in New Issue
Block a user