Set http header for CORS in nodeinfo page (#11988)
* add Access-Control-Allow-Origin header * WellKnownServerService.tsに合わせる * update changelog --------- Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
This commit is contained in:
		| @@ -135,7 +135,11 @@ export class NodeinfoServerService { | ||||
| 				.type( | ||||
| 					'application/json; profile="http://nodeinfo.diaspora.software/ns/schema/2.1#"', | ||||
| 				) | ||||
| 				.header('Cache-Control', 'public, max-age=600'); | ||||
| 				.header('Cache-Control', 'public, max-age=600') | ||||
| 				.header('Access-Control-Allow-Headers', 'Accept') | ||||
| 				.header('Access-Control-Allow-Methods', 'GET, OPTIONS') | ||||
| 				.header('Access-Control-Allow-Origin', '*') | ||||
| 				.header('Access-Control-Expose-Headers', 'Vary'); | ||||
| 			return { version: '2.1', ...base }; | ||||
| 		}); | ||||
|  | ||||
| @@ -148,7 +152,11 @@ export class NodeinfoServerService { | ||||
| 				.type( | ||||
| 					'application/json; profile="http://nodeinfo.diaspora.software/ns/schema/2.0#"', | ||||
| 				) | ||||
| 				.header('Cache-Control', 'public, max-age=600'); | ||||
| 				.header('Cache-Control', 'public, max-age=600') | ||||
| 				.header('Access-Control-Allow-Headers', 'Accept') | ||||
| 				.header('Access-Control-Allow-Methods', 'GET, OPTIONS') | ||||
| 				.header('Access-Control-Allow-Origin', '*') | ||||
| 				.header('Access-Control-Expose-Headers', 'Vary'); | ||||
| 			return { version: '2.0', ...base }; | ||||
| 		}); | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Srgr0
					Srgr0