import type { ActionFunction , LoaderFunction , MetaFunction , RouteComponent } from "remix" ; import { redirect , json , Form } from "remix" ; let loader = async ( ) => { let headers = new Headers ( ) ; headers . append ( "Set-Cookie" , "foo=bar" ) ; headers . append ( "Set-Cookie" , "bar=baz" ) ; return json ( { } , { headers } ) ; } ; let action = async ( ) => { let headers = new Headers ( ) ; headers . append ( "Set-Cookie" , "another=one" ) ; headers . append ( "Set-Cookie" , "how-about=two" ) ; return redirect ( "/multiple-set-cookies" , { headers } ) ; } ; let meta = ( ) => ( { title : "Multi Set Cookie Headers" } ) ; let MultipleSetCookiesPage = ( ) => { return ( < > < p > 👋 < /p> < Form method = "post" > < button type = "submit" > Add cookies < /button> < /Form> < />); } ; export default MultipleSetCookiesPage ; export { action , loader , meta } ;