| 
									
										
										
										
											2023-08-06 11:22:36 +02:00
										 |  |  | <?php | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-09-20 06:36:43 +02:00
										 |  |  | /* | 
					
						
							|  |  |  |  * cors.php | 
					
						
							|  |  |  |  * Copyright (c) 2023 james@firefly-iii.org | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * This file is part of Firefly III (https://github.com/firefly-iii). | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * This program is free software: you can redistribute it and/or modify | 
					
						
							|  |  |  |  * it under the terms of the GNU Affero General Public License as | 
					
						
							|  |  |  |  * published by the Free Software Foundation, either version 3 of the | 
					
						
							|  |  |  |  * License, or (at your option) any later version. | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * This program is distributed in the hope that it will be useful, | 
					
						
							|  |  |  |  * but WITHOUT ANY WARRANTY; without even the implied warranty of | 
					
						
							|  |  |  |  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | 
					
						
							|  |  |  |  * GNU Affero General Public License for more details. | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * You should have received a copy of the GNU Affero General Public License | 
					
						
							|  |  |  |  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-08-06 11:22:36 +02:00
										 |  |  | declare(strict_types=1); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | return [ | 
					
						
							|  |  |  |     /* | 
					
						
							|  |  |  |     |-------------------------------------------------------------------------- | 
					
						
							|  |  |  |     | Cross-Origin Resource Sharing (CORS) Configuration | 
					
						
							|  |  |  |     |-------------------------------------------------------------------------- | 
					
						
							|  |  |  |     | | 
					
						
							|  |  |  |     | Here you may configure your settings for cross-origin resource sharing | 
					
						
							|  |  |  |     | or "CORS". This determines what cross-origin operations may execute | 
					
						
							|  |  |  |     | in web browsers. You are free to adjust these settings as needed. | 
					
						
							|  |  |  |     | | 
					
						
							|  |  |  |     | To learn more: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS | 
					
						
							|  |  |  |     | | 
					
						
							|  |  |  |     */ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-01-01 14:45:51 +01:00
										 |  |  |     'paths'                    => ['api/*', 'sanctum/csrf-cookie'], | 
					
						
							| 
									
										
										
										
											2023-08-06 11:22:36 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-01-01 14:45:51 +01:00
										 |  |  |     'allowed_methods'          => ['*'], | 
					
						
							| 
									
										
										
										
											2023-08-06 11:22:36 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-01-01 14:45:51 +01:00
										 |  |  |     'allowed_origins'          => ['*'], | 
					
						
							| 
									
										
										
										
											2023-08-06 11:22:36 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  |     'allowed_origins_patterns' => ['*'], | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-01-01 14:45:51 +01:00
										 |  |  |     'allowed_headers'          => ['*'], | 
					
						
							| 
									
										
										
										
											2023-08-06 11:22:36 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-01-01 14:45:51 +01:00
										 |  |  |     'exposed_headers'          => [], | 
					
						
							| 
									
										
										
										
											2023-08-06 11:22:36 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-01-01 14:45:51 +01:00
										 |  |  |     'max_age'                  => 0, | 
					
						
							| 
									
										
										
										
											2023-08-06 11:22:36 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-01-01 14:45:51 +01:00
										 |  |  |     'supports_credentials'     => false, | 
					
						
							| 
									
										
										
										
											2023-08-06 11:22:36 +02:00
										 |  |  | ]; |