-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #137 from zowe/staging
Merge staging for release
- Loading branch information
Showing
1 changed file
with
24 additions
and
0 deletions.
There are no files selected for viewing
24 changes: 24 additions & 0 deletions
24
jobs-api-server/src/main/java/org/zowe/jobs/spring/CookieConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* | ||
* This program and the accompanying materials are made available under the terms of the | ||
* Eclipse Public License v2.0 which accompanies this distribution, and is available at | ||
* https://www.eclipse.org/legal/epl-v20.html | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
* | ||
* Copyright IBM Corporation 2018, 2020 | ||
*/ | ||
package org.zowe.jobs.spring; | ||
|
||
import org.apache.tomcat.util.http.LegacyCookieProcessor; | ||
import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory; | ||
import org.springframework.boot.web.server.WebServerFactoryCustomizer; | ||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
|
||
@Configuration | ||
public class CookieConfig { | ||
@Bean | ||
public WebServerFactoryCustomizer<TomcatServletWebServerFactory> cookieProcessorCustomizer() { | ||
return tomcatServletWebServerFactory -> tomcatServletWebServerFactory.addContextCustomizers(context -> context.setCookieProcessor(new LegacyCookieProcessor())); | ||
} | ||
} |