02 September, 2023
01 September, 2023
MJML to HTML using PHP
Programing Coderfunda September 01, 2023 No comments
31 August, 2023
Taking mean of consequitive non NA values in data table in R
Programing Coderfunda August 31, 2023 No comments
How to group json objects by using keys of sub value objects using jq
Programing Coderfunda August 31, 2023 No comments
30 August, 2023
Generate Saloon SDKs from Postman or OpenAPI
Programing Coderfunda August 30, 2023 No comments
29 August, 2023
Laravel Ajax Cross-Origin Request Blocked ?
Programing Coderfunda August 29, 2023 Ajax, Laravel No comments
You can enable CORS in Laravel by adding the following code to the app/Http/Middleware/VerifyCsrfToken.php file:
protected $addHttpCookie = true;
protected $except = [
'/*'
];
This code tells Laravel to exclude all routes from CSRF protection, allowing cross-origin requests to be made without being blocked.
You can also use this Alternatively way.
Step 1: Install Compose Package
Alternatively, you can install the barryvdh/laravel-cors package using Composer to enable CORS in your Laravel application. This package provides a middleware that you can add to your Laravel application to allow cross-origin requests. Here are the steps to install and use the package:
Install the package using Composer:
composer require barryvdh/laravel-cors
Step 2: Add Middleware
Add the following code to the $middleware array in the app/Http/Kernel.php file:
\Barryvdh\Cors\HandleCors::class
Step 2: Configure CORS
Add the following code to the config/cors.php file to specify the domains that are allowed to make cross-origin requests:
'allowed_origins' => [
'*',
],
'allowed_methods' => [
'POST',
'GET',
'OPTIONS',
'PUT',
'PATCH',
'DELETE',
],
'allowed_headers' => [
'Content-Type',
'X-Requested-With',
'Authorization',
],
With these steps,
How to push a docker image to a local registry from job container?
Programing Coderfunda August 29, 2023 No comments
https://some_ip_address:5000/v2/": http: server gave HTTP response to HTTPS client and the job failed...
28 August, 2023
Laravel Nova CSV Import v0.7 - Password Hashing, Random Strings and Combined Fields
Programing Coderfunda August 28, 2023 No comments
27 August, 2023
Flutter Web: Loading data from URL fails
Programing Coderfunda August 27, 2023 No comments
https:///api/v1/images//thumbnail-squared The host however has CORS enabled and returns a header "access-control-allow-origin" -> "*". The URL redirects a 302 to a signed google cloud storage file however. Might this be the issue?
26 August, 2023
Fallback route vs Exception handler for handling otherwise undefined routes/pages
Programing Coderfunda August 26, 2023 No comments
https://mysite.com/MySuperGreatDiscountCode will automatically apply the code to the user's cart. It is also used to allow admin users of the application to be able to create random pages in our headless CMS without having to specifically define routes to those pages. The way Folio seems to work is that it also defines a fallback route that kicks off its route resolution process. What I'm currently experiencing is that Folio's fallback route is never called, and my already existing one handles the requests. When I remove my existing fallback route, Folio starts working as expected, but, as you've guessed, I lose the ability to have requests that point to a code or a CMS page. In trying to get Folio to play nice with my application I've been looking at different ways for handling requests for discount codes or pages that only exist in the CMS. My first thought was to use a middleware that would look for a 404 status code on the response, and if one is found, it would execute the logic to see if the request was for a discount code or a CMS page and return the appropriate response. However I couldn't get this to work because it seems the Laravel Exception handler "short circuits" the middleware stack when an exception is thrown/rendered. My IsItA404Response middleware was never being called when a NotFoundHttpException was being thrown. This lead me to move the discount code/cms page resolution logic to the Exception Handler's render method. This is working, but it seems a bit "hacky" to me. I'm curious to know what everyone thinks of using the Exception Handler in this way or if you have a better idea of how to handle this. submitted by /u/adear11 [link] [comments]
25 August, 2023
My express react App keeps on giving me the error that It cannot find my api
Programing Coderfunda August 25, 2023 No comments
24 August, 2023
Laravel 10.20 Released
Programing Coderfunda August 24, 2023 No comments
23 August, 2023
Best way to show small notifications to users
Programing Coderfunda August 23, 2023 No comments
22 August, 2023
Append a child element to the custom web component in the constructor function
Programing Coderfunda August 22, 2023 No comments
21 August, 2023
SQL Query Error - Error Source: .Net SqlClient Data Provider
Programing Coderfunda August 21, 2023 No comments
20 August, 2023
My react-native project brakes after installing react-native-image-picker but it works fine if i uninstall it
Programing Coderfunda August 20, 2023 No comments
The token request was rejected by the remote server
Programing Coderfunda August 20, 2023 No comments
https://documentation.openiddict.com/errors/ID2147 I could not solve the error. can you help me?
https://github.com/openiddict/openiddict-samples/tree/dev/samples/Velusia I included the above example in my project. The above example works. but it doesn't work in my project I'm having a problem on the Authorization Server side. output : OpenIddict.Server.OpenIddictServerDispatcher: Information: The authorization response was successfully returned to '
https://localhost:5031/callback/login/local' using the query response mode: { "code": "[redacted]", "state": "pyjEcCmIurWYNUbVW6px20XAGcB3QLqMZZMlbuqvQFI", "iss": "
https://localhost:4001/" }. OpenIddict.Server.OpenIddictServerDispatcher: Information: The request URI matched a server endpoint: Token. OpenIddict.Server.OpenIddictServerDispatcher: Information: The token request was successfully extracted: { "grant_type": "authorization_code", "code": "[redacted]", "code_verifier": "HzyYo3QH9MTL4b63E7-R9z7-S9VIF8O3SOMSkMqNJR4", "redirect_uri": "
https://localhost:5031/callback/login/local", "client_id": "dkgshared", "client_secret": "[redacted]" }. OpenIddict.Server.OpenIddictServerDispatcher: Information: The response was successfully returned as a JSON document: { "error": "invalid_grant", "error_description": "The specified token is invalid.", "error_uri": "
https://documentation.openiddict.com/errors/ID2004" }.
19 August, 2023
The instance of entity type '' cannot be tracked because another instance with the same key value for {'Id'} is already being tracked
Programing Coderfunda August 19, 2023 No comments
18 August, 2023
Search for Jobs on LaraJobs from Raycast
Programing Coderfunda August 18, 2023 No comments
17 August, 2023
Laravel transactions: Why and how to use them with real-life use cases
Programing Coderfunda August 17, 2023 No comments
16 August, 2023
Laravel Volt / Folio Beta 5 is out, now with named routes
Programing Coderfunda August 16, 2023 No comments
Shorten URLs in Your Laravel App with the Cuttly Package
Programing Coderfunda August 16, 2023 No comments
15 August, 2023
Digging Into Livewire 3 Forms
Programing Coderfunda August 15, 2023 No comments
14 August, 2023
The Laracon AU 2023 schedule is here
Programing Coderfunda August 14, 2023 No comments
13 August, 2023
why getElementById It returns different every time in console
Programing Coderfunda August 13, 2023 No comments
12 August, 2023
Convert Numbers to Words in Laravel with SpellNumber
Programing Coderfunda August 12, 2023 No comments
11 August, 2023
dynamically open dropdown in vue
Programing Coderfunda August 11, 2023 No comments
10 August, 2023
Bolt is a Laravel Form Builder for the TALL Stack
Programing Coderfunda August 10, 2023 No comments
09 August, 2023
Infrastructure management for several high-traffic PHP applications
Programing Coderfunda August 09, 2023 No comments
08 August, 2023
Can we implement tap and pay with NFC in apple without using Apple Pay?
Programing Coderfunda August 08, 2023 No comments