Add robots.txt to forgejo
This commit is contained in:
		
							parent
							
								
									d39566e0ff
								
							
						
					
					
						commit
						a70ea6ef2a
					
				
					 3 changed files with 86 additions and 0 deletions
				
			
		
							
								
								
									
										78
									
								
								playbooks/roles/forgejo/files/public/robots.txt
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										78
									
								
								playbooks/roles/forgejo/files/public/robots.txt
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,78 @@ | ||||||
|  | User-agent: * | ||||||
|  | Disallow: /api/* | ||||||
|  | Disallow: /avatars | ||||||
|  | Disallow: /user/* | ||||||
|  | Disallow: /*/*/*/refs/* | ||||||
|  | Disallow: /*/*/*/star | ||||||
|  | Disallow: /*/*/*/watch | ||||||
|  | Disallow: /*/*/labels | ||||||
|  | Disallow: /*/*/activity/* | ||||||
|  | Disallow: /vendor/* | ||||||
|  | Disallow: /swagger.*.json | ||||||
|  | 
 | ||||||
|  | Disallow: /explore/*?* | ||||||
|  | 
 | ||||||
|  | Disallow: /repo/create | ||||||
|  | Disallow: /repo/migrate | ||||||
|  | Disallow: /org/create | ||||||
|  | Disallow: /*/*/fork | ||||||
|  | 
 | ||||||
|  | Disallow: /*/*/watchers | ||||||
|  | Disallow: /*/*/stargazers | ||||||
|  | Disallow: /*/*/forks | ||||||
|  | 
 | ||||||
|  | Disallow: /*/*/actions?* | ||||||
|  | Disallow: /*/*/actions/runs/* | ||||||
|  | Disallow: /*/*/activity | ||||||
|  | Disallow: /*/*/projects | ||||||
|  | Disallow: /*/*/branches | ||||||
|  | Disallow: /*/*/tags | ||||||
|  | Disallow: /*/*/compare | ||||||
|  | Disallow: /*/*/lastcommit/* | ||||||
|  | 
 | ||||||
|  | Disallow: /*/*/issues/new | ||||||
|  | Disallow: /*/*/issues/?* | ||||||
|  | Disallow: /*/*/issues?* | ||||||
|  | Disallow: /*/*/pulls/?* | ||||||
|  | Disallow: /*/*/pulls?* | ||||||
|  | Disallow: /*/*/pulls/*/files | ||||||
|  | 
 | ||||||
|  | Disallow: /*/tree/ | ||||||
|  | Disallow: /*/download | ||||||
|  | Disallow: /*/revisions | ||||||
|  | Disallow: /*/commits/*?author | ||||||
|  | Disallow: /*/commits/*?path | ||||||
|  | Disallow: /*/comments | ||||||
|  | Disallow: /*/blame/ | ||||||
|  | Disallow: /*/raw/ | ||||||
|  | Disallow: /*/cache/ | ||||||
|  | Disallow: /.git/ | ||||||
|  | Disallow: */.git/ | ||||||
|  | Disallow: /*.git | ||||||
|  | Disallow: /*.atom | ||||||
|  | Disallow: /*.rss | ||||||
|  | 
 | ||||||
|  | Disallow: /*/*/archive/ | ||||||
|  | Disallow: *.bundle | ||||||
|  | Disallow: */commit/*.patch | ||||||
|  | Disallow: */commit/*.diff | ||||||
|  | 
 | ||||||
|  | Disallow: /*lang=* | ||||||
|  | Disallow: /*source=* | ||||||
|  | Disallow: /*ref_cta=* | ||||||
|  | Disallow: /*plan=* | ||||||
|  | Disallow: /*return_to=* | ||||||
|  | Disallow: /*ref_loc=* | ||||||
|  | Disallow: /*setup_organization=* | ||||||
|  | Disallow: /*source_repo=* | ||||||
|  | Disallow: /*ref_page=* | ||||||
|  | Disallow: /*source=* | ||||||
|  | Disallow: /*referrer=* | ||||||
|  | Disallow: /*report=* | ||||||
|  | Disallow: /*author=* | ||||||
|  | Disallow: /*since=* | ||||||
|  | Disallow: /*until=* | ||||||
|  | Disallow: /*commits?author=* | ||||||
|  | Disallow: /*tab=* | ||||||
|  | Disallow: /*q=* | ||||||
|  | Disallow: /*repo-search-archived=* | ||||||
|  | @ -25,5 +25,12 @@ | ||||||
|         mode: "0644" |         mode: "0644" | ||||||
|       notify: Restart service {{ role_name }} |       notify: Restart service {{ role_name }} | ||||||
| 
 | 
 | ||||||
|  |     - name: Copy the public files | ||||||
|  |       ansible.builtin.copy: | ||||||
|  |         src: public/ | ||||||
|  |         dest: "{{ (service_path, 'public') | path_join }}" | ||||||
|  |         mode: "0644" | ||||||
|  |       notify: Restart service {{ role_name }} | ||||||
|  | 
 | ||||||
|     - name: Import start tasks for common service |     - name: Import start tasks for common service | ||||||
|       ansible.builtin.import_tasks: tasks/start-common-service.yml |       ansible.builtin.import_tasks: tasks/start-common-service.yml | ||||||
|  |  | ||||||
|  | @ -86,6 +86,7 @@ forgejo_compose: | ||||||
|   volumes: |   volumes: | ||||||
|     - data:/data |     - data:/data | ||||||
|     - ./templates:/data/gitea/templates |     - ./templates:/data/gitea/templates | ||||||
|  |     - ./public:/data/gitea/public | ||||||
|     - /etc/timezone:/etc/timezone:ro |     - /etc/timezone:/etc/timezone:ro | ||||||
|     - /etc/localtime:/etc/localtime:ro |     - /etc/localtime:/etc/localtime:ro | ||||||
|   file: |   file: | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue