diff --git a/core/request.cpp b/core/request.cpp index 3bc5ffd..73f3d6e 100755 --- a/core/request.cpp +++ b/core/request.cpp @@ -114,7 +114,12 @@ void Request::SetCookie(const char * name, const char * value, tm * expires) if( expires ) headers << "; expires=" << DateToStrCookie(expires) << " GMT"; - headers << "; path=/; domain=" << config->base_url << "\r\n"; + headers << "; path=/; domain=" << config->base_url; + + if( using_ssl ) + headers << "; secure"; + + headers << "\r\n"; } @@ -126,7 +131,12 @@ void Request::SetCookie(const char * name, long value, tm * expires) if( expires ) headers << "; expires=" << DateToStrCookie(expires) << " GMT"; - headers << "; path=/; domain=" << config->base_url << "\r\n"; + headers << "; path=/; domain=" << config->base_url; + + if( using_ssl ) + headers << "; secure"; + + headers << "\r\n"; }