Category: Programming
-
GitHub Actions – No .git folder fix for Docker builds
Add `context: .` to `docker/build-push-action` to fix the no `.git` folder issue.
-
Spring Security – Fixing Non-Thymeleaf _csrf Variable to make CSRF work again đ
In non-Thymeleaf projects (in my case pug4j), _csrf is not automatically implemented and included in the template variables. I had some trouble finding how to do it but the solution was in this paragraph: If these options are not available, you can take advantage of the fact that the CsrfToken is exposed as an HttpServletRequest attribute named _csrf. The following…
-
ArduPilot Build – Simplified Documentation
Reproducibility: Using a Docker container to produce this build. Then, setup the build. Main Build Tool: ./waf TL;DR$ docker run –rm -it -v ./ardu-build:/builds python:3.11-alpine sh -c “cd /builds && sh”$ apk add nano htop openssh git curl wget gcc g++ make zlib-dev libffi-dev openssl-dev musl-dev gcc-arm-none-eabi g++-arm-none-eabi$ python -m pip uninstall empy && python…
-
Laravel – Enable SSL on MySQL/MariaDB Connections
In database.php modify to have these lines, yours might not have it already included: ‘sslmode’ => env(‘DB_SSLMODE’, ‘prefer’),’options’ => extension_loaded(‘pdo_mysql’) ? array_filter([ PDO::MYSQL_ATTR_SSL_CA => env(‘MYSQL_ATTR_SSL_CA’) !== null ? base_path(env(‘MYSQL_ATTR_SSL_CA’)) : env(‘MYSQL_ATTR_SSL_CA’),]) : [], Then, in .env you must add two additional keys: MYSQL_ATTR_SSL_CA=ca.crt Where this file is inside the current project directory, you can make…
-
Laravel – Fix 419 Page Expired with config:cache
I’m working on a project that uses Laravel and sessions for login and other forms. I’ve encountered an issue where I would encounter a 419 Page Expired error when running my project on a local development environment. The solution ended up being the need to manually cache the config with: php artisan config:cache Whenever you…
-
Lumen/Laravel URL parameters not parsing anymore solution for NGINX users
Just dropping this here in case anyone is using LEMP, specifically Laravel and NGINX, and have recently migrated their config to another server as well as a new NGINX server. On our migration, we encountered an issue where Lumen no longer parsed our URL parameters (query params?) and frustratingly nothing seemed to work: $request->all() ->…