59
59
*
60
60
* @author <a href="http://88250.b3log.org">Liang Ding</a>
61
61
* @author <a href="mailto:385321165@qq.com">DASHU</a>
62
- * @version 1.2.3 .6, May 7 , 2017
62
+ * @version 1.2.4 .6, Jun 28 , 2017
63
63
* @since 0.3.1
64
64
*/
65
65
@ RequestProcessor
@@ -97,8 +97,8 @@ public class IndexProcessor {
97
97
/**
98
98
* Shows index with the specified context.
99
99
*
100
- * @param context the specified context
101
- * @param request the specified HTTP servlet request
100
+ * @param context the specified context
101
+ * @param request the specified HTTP servlet request
102
102
* @param response the specified HTTP servlet response
103
103
*/
104
104
@ RequestProcessing (value = {"/\\ d*" , "" }, uriPatternsMode = URIPatternMode .REGEX , method = HTTPRequestMethod .GET )
@@ -119,8 +119,8 @@ public void showIndex(final HTTPRequestContext context, final HttpServletRequest
119
119
if ("default" .equals (specifiedSkin )) {
120
120
specifiedSkin = preference .optString (Option .ID_C_SKIN_DIR_NAME );
121
121
122
- final Cookie cookie = new Cookie ("skin" , null );
123
- cookie .setMaxAge (0 );
122
+ final Cookie cookie = new Cookie (Skin . SKIN , null );
123
+ cookie .setMaxAge (60 * 60 ); // 1 hour
124
124
cookie .setPath ("/" );
125
125
response .addCookie (cookie );
126
126
}
@@ -158,6 +158,7 @@ public void showIndex(final HTTPRequestContext context, final HttpServletRequest
158
158
// https://github.com/b3log/solo/issues/12060
159
159
if (!preference .optString (Skin .SKIN_DIR_NAME ).equals (specifiedSkin ) && !Requests .mobileRequest (request )) {
160
160
final Cookie cookie = new Cookie (Skin .SKIN , specifiedSkin );
161
+ cookie .setMaxAge (60 * 60 ); // 1 hour
161
162
cookie .setPath ("/" );
162
163
response .addCookie (cookie );
163
164
}
@@ -175,8 +176,8 @@ public void showIndex(final HTTPRequestContext context, final HttpServletRequest
175
176
/**
176
177
* Shows kill browser page with the specified context.
177
178
*
178
- * @param context the specified context
179
- * @param request the specified HTTP servlet request
179
+ * @param context the specified context
180
+ * @param request the specified HTTP servlet request
180
181
* @param response the specified HTTP servlet response
181
182
*/
182
183
@ RequestProcessing (value = "/kill-browser" , method = HTTPRequestMethod .GET )
@@ -212,8 +213,8 @@ public void showKillBrowser(final HTTPRequestContext context, final HttpServletR
212
213
/**
213
214
* Show register page.
214
215
*
215
- * @param context the specified context
216
- * @param request the specified HTTP servlet request
216
+ * @param context the specified context
217
+ * @param request the specified HTTP servlet request
217
218
* @param response the specified HTTP servlet response
218
219
*/
219
220
@ RequestProcessing (value = "/register" , method = HTTPRequestMethod .GET )
0 commit comments