Laravel/Nginx - Customize Header request

2019-08-31 18:37发布

I have simple laravel project. I recive data from GET url. Datas is sending from small device and i need set small/short header response for him. It's very important for optimization.

In laravel i don't use view, only Controller function.

Below is my full response:

Cache-Control: no-cache, private
Connection: keep-alive
Content-Encoding: gzip
Content-Type: text/html; charset=UTF-8
Date: Wed, 03 Oct 2018 06:58:24 GMT
Server: nginx/1.14.0 (Ubuntu)
Set-Cookie: XSRF-TOKEN=eyJpdiI6IkpZNEllbGt0YmtsVll6ajdCSVkrNHc9PSIsInZhbHVlIjoiOFhOakxDNUVka0tIRFwvTHdidXRwdjRHMWlFeEl5QzJIcUQ4VTJXTmkzXC9VZm5rRzI3ZjI3S2N2SEZ5aE1jVEluIiwibWFjIjoiNDkwMDU2MmI3NzdkMjA2MmVkNmUyMWZkMWNhN2YzNDA3ZDZlOGMwYzIyMDU1N2Q5ZjdlYzcxODg0NDJjZTkzZiJ9; expires=Wed, 03-Oct-2018 08:58:24 GMT; Max-Age=7200; path=/
Set-Cookie: laravel_session=eyJpdiI6ImpYZG5ZNk1yWnNQb1Y1RlRSOWQ3aUE9PSIsInZhbHVlIjoieW8ySFwvQWsySG1pSEFabGZRNkR5U0t5TUhSQzZsN3lFbG1zT29TSFdhdnFVQTczVWxSWXZsZnVPR216a2N3cE8iLCJtYWMiOiIyYmI3M2Q2YWUxMDAzOTYwNjRlOWMwYWVlZGRmMWI5NWY4N2EyNGQwZTVmODRkMThhOTQ0MGIzYzVlNGI0MWNjIn0%3D; expires=Wed, 03-Oct-2018 08:58:24 GMT; Max-Age=7200; path=/; httponly
Transfer-Encoding: chunked

What is the best solution? I use laravel 5.7, first i would like remove "Set-Cookie:" from one view only .

标签: laravel nginx
0条回答
登录 后发表回答