Fix Webhooks for Drone not working in Gitea 1.16
By default, only external requests are allowed: https://github.com/go-gitea/gitea/pull/17482
This commit is contained in:
		
							parent
							
								
									a2f1b7ccc6
								
							
						
					
					
						commit
						03c7940f1c
					
				| @ -4,3 +4,9 @@ node.default["kosmos_gitea"]["binary_url"] = "https://dl.gitea.io/gitea/#{gitea_ | |||||||
| node.default["kosmos_gitea"]["binary_checksum"] = "f03f3a3c4dccc2219351cde5c9af372715b2ec3e88a821779702bc6f38084c97" | node.default["kosmos_gitea"]["binary_checksum"] = "f03f3a3c4dccc2219351cde5c9af372715b2ec3e88a821779702bc6f38084c97" | ||||||
| node.default["kosmos_gitea"]["nginx"]["domain"] = "gitea.kosmos.org" | node.default["kosmos_gitea"]["nginx"]["domain"] = "gitea.kosmos.org" | ||||||
| node.default["kosmos_gitea"]["working_directory"] = "/var/lib/gitea" | node.default["kosmos_gitea"]["working_directory"] = "/var/lib/gitea" | ||||||
|  | 
 | ||||||
|  | node.default["kosmos_gitea"]["config"] = { | ||||||
|  |   "webhook":  { | ||||||
|  |     "allowed_host_list" => "external,127.0.1.1" | ||||||
|  |   } | ||||||
|  | } | ||||||
|  | |||||||
| @ -90,7 +90,8 @@ template "#{config_directory}/app.ini" do | |||||||
|             postgresql_password: gitea_data_bag_item["postgresql_password"], |             postgresql_password: gitea_data_bag_item["postgresql_password"], | ||||||
|             smtp_host: smtp_credentials["relayhost"], |             smtp_host: smtp_credentials["relayhost"], | ||||||
|             smtp_user: smtp_credentials["user_name"], |             smtp_user: smtp_credentials["user_name"], | ||||||
|             smtp_password: smtp_credentials["password"] |             smtp_password: smtp_credentials["password"], | ||||||
|  |             config: node["kosmos_gitea"]["config"] | ||||||
|   notifies :restart, "service[gitea]", :delayed |   notifies :restart, "service[gitea]", :delayed | ||||||
| end | end | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -85,3 +85,8 @@ ALLOWED_TYPES = image/gif|image/jpeg|image/png|application/zip|application/gzip | |||||||
| MAX_SIZE = 10 | MAX_SIZE = 10 | ||||||
| ; ; Max number of files per upload. Defaults to 5 | ; ; Max number of files per upload. Defaults to 5 | ||||||
| MAX_FILES = 5 | MAX_FILES = 5 | ||||||
|  | 
 | ||||||
|  | <% if c = @config["webhook"] %> | ||||||
|  | [webhook] | ||||||
|  | <% if c["allowed_host_list"] %>ALLOWED_HOST_LIST = <%= c["allowed_host_list"] %><% end %> | ||||||
|  | <% end %> | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user