Use Optional and supplier to match the servlet filter