-
Notifications
You must be signed in to change notification settings - Fork 329
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor Docker configuration and development setup
- Update .dockerignore with comprehensive ignore patterns for API and client - Modify docker-compose files to improve service configurations - Enhance Nginx configuration for development and production environments - Refactor Dockerfile.api with improved build process - Add docker-setup.sh script for simplified Docker deployment - Update update-credentials.vue page with improved UI - Remove hCaptcha dependency from package-lock.json - Update PHP configuration and entrypoint scripts
- Loading branch information
Showing
26 changed files
with
1,980 additions
and
1,751 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?php | ||
|
||
namespace App\Http\Middleware; | ||
|
||
use Closure; | ||
use Illuminate\Http\Request; | ||
|
||
class DevCorsMiddleware | ||
{ | ||
public function handle(Request $request, Closure $next) | ||
{ | ||
// Only apply in development mode | ||
if (!config('app.dev_cors')) { | ||
return $next($request); | ||
} | ||
|
||
$response = $next($request); | ||
|
||
// Handle preflight OPTIONS request | ||
if ($request->isMethod('OPTIONS')) { | ||
$response = response('', 200); | ||
} | ||
|
||
// Add CORS headers | ||
$response->headers->set('Access-Control-Allow-Origin', 'http://localhost:3000', true); | ||
$response->headers->set('Access-Control-Allow-Methods', 'GET, POST, PUT, DELETE, OPTIONS, PATCH', true); | ||
$response->headers->set('Access-Control-Allow-Headers', 'DNT, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Range, Authorization, X-XSRF-TOKEN, Accept', true); | ||
$response->headers->set('Access-Control-Allow-Credentials', 'true', true); | ||
$response->headers->set('Access-Control-Expose-Headers', 'Content-Length, Content-Range', true); | ||
|
||
return $response; | ||
} | ||
} |
Empty file.
Oops, something went wrong.