Jenkins turns off cross-site request forgery protection in Docker Container

1. Open the terminal and enter the command to enter the docker container

1
docker exec -u root -it jenkins bash

2. Enter the command to edit the jenkins startup configuration file

1
vi /usr/local/bin/jenkins.sh

vi command not found ?

1
2
apt-get update
apt-get install vim

3. Add the following configuration in the location shown

1
-Dhudson.security.csrf.GlobalCrumbIssuerConfiguration.DISABLE_CSRF_PROTECTION=true

jenkins.sh

4. Restart jenkins container

1
docker restart jenkins

Jenkins turns off cross-site request forgery protection in Docker Container
https://www.hardyhu.cn/2022/02/08/Jenkins-turns-off-cross-site-request-forgery-protection-in-Docker-Container/
Author
John Doe
Posted on
February 9, 2022
Licensed under