barryvdh

barryvdh

Member Since 10 years ago

@fruitcake , Noord-Brabant, the Netherlands

Experience Points
5k
follower
Lessons Completed
13
follow
Lessons Completed
325
stars
Best Reply Awards
277
repos

356 contributions in the last year

barryvdh Most Used Languages
barryvdh GitHub Stats

6 Pinned

⚡ Laravel Debugbar (Integrates PHP Debug Bar)
⚡ Laravel IDE Helper
⚡ Adds CORS (Cross-Origin Resource Sharing) headers support in your Laravel application
⚡ A toolbar for Laravel Telescope, based on the Symfony Web Profiler.
⚡ A framework agnostic, multi-gateway payment processing library for PHP 5.6+
⚡ Debug bar for PHP
Sep
16
1 day ago
started
started time in 14 hours ago
Sep
13
4 days ago
Activity icon
issue

barryvdh issue comment barryvdh/laravel-debugbar

barryvdh
barryvdh

Trying to get in touch regarding a security issue

Hey there!

I'd like to report a security issue but cannot find contact instructions on your repository.

If not a hassle, might you kindly add a SECURITY.md file with an email, or another contact method? GitHub recommends this best practice to ensure security issues are responsibly disclosed, and it would serve as a simple instruction for security researchers in the future.

Thank you for your consideration, and I look forward to hearing from you!

(cc @huntr-helper)

barryvdh
barryvdh

The security issue is about the use of rand() in the garbage collection, which I deem to be not an actual security risk. I'm open to a PR to change this though.

push

barryvdh push barryvdh/laravel-debugbar

barryvdh
barryvdh

Create SECURITY.md (#1227)

A simple instruction for security researchers. Closes #1226

commit sha: a552b6892743310fe72be2af65cae9406955efd4

push time in 3 days ago
pull request

barryvdh pull request barryvdh/laravel-debugbar

barryvdh
barryvdh

Create SECURITY.md

A simple instruction for security researchers. Closes #1226

Activity icon
issue

barryvdh issue barryvdh/laravel-debugbar

barryvdh
barryvdh

Trying to get in touch regarding a security issue

Hey there!

I'd like to report a security issue but cannot find contact instructions on your repository.

If not a hassle, might you kindly add a SECURITY.md file with an email, or another contact method? GitHub recommends this best practice to ensure security issues are responsibly disclosed, and it would serve as a simple instruction for security researchers in the future.

Thank you for your consideration, and I look forward to hearing from you!

(cc @huntr-helper)

Activity icon
issue

barryvdh issue comment magento/magento2

barryvdh
barryvdh

Add SMTP configuration + transport options

Description (*)

This adds the SMTP Transport from Laminas, to configure external SMTP with authentication.

image

Fixed Issues (if relevant)

Fixes #26104

  1. Fixes magento/magento2#<issue_number>

Manual testing scenarios (*)

Create an SMTP account somewhere (Sendgrid, Mailgun, Mailtrap etc). Go to System -> Mail Configuration and fill the details Send any email (eg Customer Password reset) See it works

Questions or comments

  • The XML Path constants are repeated a bit, perhaps it would be better to create a prefix path and call $this->getConfig('host')
  • I disabled cram-md5 because it requires an external package. We could allow it and add a note to require it yourself if wanted.

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds are green)
Sep
10
1 week ago
Activity icon
issue

barryvdh issue comment barryvdh/laravel-debugbar

barryvdh
barryvdh

Trying to get in touch regarding a security issue

Hey there!

I'd like to report a security issue but cannot find contact instructions on your repository.

If not a hassle, might you kindly add a SECURITY.md file with an email, or another contact method? GitHub recommends this best practice to ensure security issues are responsibly disclosed, and it would serve as a simple instruction for security researchers in the future.

Thank you for your consideration, and I look forward to hearing from you!

(cc @huntr-helper)

barryvdh
barryvdh
Activity icon
issue

barryvdh issue comment magento/magento2

barryvdh
barryvdh

Add SMTP configuration + transport options

Description (*)

This adds the SMTP Transport from Laminas, to configure external SMTP with authentication.

image

Fixed Issues (if relevant)

Fixes #26104

  1. Fixes magento/magento2#<issue_number>

Manual testing scenarios (*)

Create an SMTP account somewhere (Sendgrid, Mailgun, Mailtrap etc). Go to System -> Mail Configuration and fill the details Send any email (eg Customer Password reset) See it works

Questions or comments

  • The XML Path constants are repeated a bit, perhaps it would be better to create a prefix path and call $this->getConfig('host')
  • I disabled cram-md5 because it requires an external package. We could allow it and add a note to require it yourself if wanted.

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds are green)
barryvdh
barryvdh
push

barryvdh push barryvdh/magento2

barryvdh
barryvdh

ENGCOM-9066: MFTF: Change Customer Password With Enabled Captcha #32936

barryvdh
barryvdh

ENGCOM-9064: Replace repetitive actions with Action Groups in ProductsListWidgetTest #32714

barryvdh
barryvdh

ENGCOM-9063: MFTF: Applying Coupon Codes With Enabled Captcha #32931

barryvdh
barryvdh

ENGCOM-9061: #32760 fix order items missing in invoice email when invoice created … #32902

barryvdh
barryvdh

ENGCOM-9050: Load resizable jquery-ui chunk for knockout resizable binding only when actually used #32756

barryvdh
barryvdh

ENGCOM-9047: MFTF: Storefront customer product reviews in my account #32701

barryvdh
barryvdh

ENGCOM-8996: Make sure all 301 url redirects get generated when importing more the… #32640

barryvdh
barryvdh

ENGCOM-8966: Replace repetitive actions with Action Groups in AdminUpdateSimpleProductWithRegularPriceOutOfStockTest #32529

barryvdh
barryvdh

ENGCOM-8913: Move assign category ids to beforeToHtml instead inside load collection #32390

barryvdh
barryvdh

ENGCOM-8704: Replace repetitive actions with Action Groups in AdminDeleteConfigurableChildProductsTest #31791

barryvdh
barryvdh

ENGCOM-8071: Always use canonical urls in the sitemap #29184

barryvdh
barryvdh
barryvdh
barryvdh

cast incoming untyped parameters to string type

barryvdh
barryvdh

Merge remote-tracking branch 'mainline/2.4-develop' into AC-228

barryvdh
barryvdh

:arrows_clockwise: [Magento Community Engineering] Community Contributions - 2.4-develop

Accepted Community Pull Requests:

  • magento/magento2#33169: Update README.md (by @manavluhar)
  • magento/magento2#33167: Adjustment stale-bot configuration with Severity Labels (by @sdzhepa)
  • magento/magento2#32959: magento/magento2#32309: IncosistentReferenceDefinition wrong check result (by @engcom-Foxtrot)
  • magento/magento2#32772: MFTF: Update Admin User Password (by @DmitryTsymbal)
  • magento/magento2#32936: MFTF: Change Customer Password With Enabled Captcha (by @DmitryTsymbal)
  • magento/magento2#32714: Replace repetitive actions with Action Groups in ProductsListWidgetTest (by @kate-kyzyma)
  • magento/magento2#32931: MFTF: Applying Coupon Codes With Enabled Captcha (by @DmitryTsymbal)
  • magento/magento2#32902: #32760 fix order items missing in invoice email when invoice created … (by @vovsky)
  • magento/magento2#32756: Load resizable jquery-ui chunk for knockout resizable binding only when actually used (by @martasiewierska)
  • magento/magento2#32701: MFTF: Storefront customer product reviews in my account (by @DmitryTsymbal)
  • magento/magento2#32640: Make sure all 301 url redirects get generated when importing more the… (by @hostep)
  • magento/magento2#32529: Replace repetitive actions with Action Groups in AdminUpdateSimpleProductWithRegularPriceOutOfStockTest (by @kate-kyzyma)
  • magento/magento2#32390: Move assign category ids to beforeToHtml instead inside load collection (by @mrtuvn)
  • magento/magento2#31791: Replace repetitive actions with Action Groups in AdminDeleteConfigurableChildProductsTest (by @kate-kyzyma)
  • magento/magento2#29184: Always use canonical urls in the sitemap (by @AntonEvers)

Fixed GitHub Issues:

  • magento/magento2#33247: [Issue] Update README.md (reported by @m2-assistant[bot]) has been fixed in magento/magento2#33169 by @manavluhar in 2.4-develop branch Related commits:

    1. c1fc8cb41e97dac644d12a1cdb0077f10e559cd3
  • magento/magento2#32309: IncosistentReferenceDefinition wrong check result (reported by @Nuranto) has been fixed in magento/magento2#32959 by @engcom-Foxtrot in 2.4-develop branch Related commits:

    1. 3d14e8c861b69988189c0da0c29912b59ba93ea1
    2. 00baa67b7fd039d1f3cee977975f3be583163b37
    3. d98d958d8e306e923160ca03f9d7c1cafa915276
    4. 0ef6ef96cbf44af7f5cfc899d1519d9a0449c2ab
    5. f9dd81683216e5563620017a611195f3ce21f91d
    6. e405b8f476b55e424287b55ab0becaeaa618408a
  • magento/magento2#32760: Invoice Created Via /V1/order/:orderId/invoice Missing Items in Invoice Email (reported by @moranotcsos) has been fixed in magento/magento2#32902 by @vovsky in 2.4-develop branch Related commits:

    1. c47505d0ac890d62b054cfb7be7b505ab4480f97
    2. 158331dafa299df3c718cc7343e7cb0a55039791
  • magento/magento2#32753: Resizable knockout binding does not work on the frontend (reported by @martasiewierska) has been fixed in magento/magento2#32756 by @martasiewierska in 2.4-develop branch Related commits:

    1. e282209df4aa8b8795cd8af7dc446dd0822e87f1
    2. 4ddefaf758d9de53ea547d99e4f235c571021279
    3. 9c9b8ce56f3c790fb24af8eb918d3b9304b95157
  • magento/magento2#29520: [Issue] Bug - addition of arrays instead of array merging (reported by @m2-assistant[bot]) has been fixed in magento/magento2#32640 by @hostep in 2.4-develop branch Related commits:

    1. 7ac4da78ad64b6c24b74fe5c79cfc1e3bd39e33d
    2. e792abcb1e18e1ebe998252c832f1b7b63a0e515
    3. b6bfb660465464b263ea9fdce880536d044ba03f
  • magento/magento2#32657: [Issue] Make sure all 301 url redirects get generated when importing more the… (reported by @m2-assistant[bot]) has been fixed in magento/magento2#32640 by @hostep in 2.4-develop branch Related commits:

    1. 7ac4da78ad64b6c24b74fe5c79cfc1e3bd39e33d
    2. e792abcb1e18e1ebe998252c832f1b7b63a0e515
    3. b6bfb660465464b263ea9fdce880536d044ba03f
  • magento/magento2#32584: [Issue] Replace repetitive actions with Action Groups in AdminUpdateSimpleProductWithRegularPriceOutOfStockTest (reported by @m2-assistant[bot]) has been fixed in magento/magento2#32529 by @kate-kyzyma in 2.4-develop branch Related commits:

    1. feaed6b364731e39df95a898aa64928c1b8548ca
    2. 466a537522a8eab739c46643e3bcab35c4ccab21
    3. 93b4863f1791faebaaa86a57c17bdc3185073e6b
    4. e2f0545bed5f8a7b333ecae4af8f3d6345049ea8
    5. 5c5b837bd86bcadb205d81c2250426403ee79a54
    6. f6ad9d97f06dc1db892ebb4965c335ae3210ffdf
    7. ee0c3ab8b417d88f7d2db4dc79392db95631a316
    8. c587f7239d7b3b7b761cd9cd461a66131b47f996
  • magento/magento2#32268: Breaking BC changes in the product list block (reported by @tzyganu) has been fixed in magento/magento2#32390 by @mrtuvn in 2.4-develop branch Related commits:

    1. c0d7665fe611981c0d651b0200bd577a2e333028
  • magento/magento2#33080: [Issue] Replace repetitive actions with Action Groups in AdminDeleteConfigurableChildProductsTest (reported by @m2-assistant[bot]) has been fixed in magento/magento2#31791 by @kate-kyzyma in 2.4-develop branch Related commits:

    1. 722ddefef40fdbd10a02257f6866c82e47f4d12e
    2. 25f53e2c8c0aacb7f1fb3dbebc0a16cc24f32e7d
    3. 29e68ee3ac5a0eadedda0d62a85c11e5e15eb31a
    4. fb303772ff2ac4272988b57a63590b85ba823d1c
    5. cdbd5b271b0a7a5760cba0953153bbe054c871b6
    6. 738c869f41243199fa5273d2b21bc99f9c1ab75f
    7. 74cdf94ae54ea5d047782455d90a3c3704f5cdf9
  • magento/magento2#23363: New issues with product url's in sitemap.xml generation after PR 23129 got merged. (reported by @hostep) has been fixed in magento/magento2#29184 by @AntonEvers in 2.4-develop branch Related commits:

    1. f2ec5f00dcdaede9b54f027ffbd92390da4d69c5
    2. 74eacbd2ea2a5c662d1482ec785a05392ea6f2ab
    3. 0c4267eaac5091b241c3ff59aa2cd4a1b74db53b
barryvdh
barryvdh

add unit tests for encodeUrlParam and escapeCss methods

barryvdh
barryvdh
barryvdh
barryvdh

Merge remote-tracking branch 'mainline/2.4-develop' into AC-229-tinymce5

barryvdh
barryvdh

Merge remote-tracking branch 'trigger/AC-229-tinymce5' into AC-245-tinymce5

commit sha: 023bd90c6008e5efece8dd6456665580f913f4e2

push time in 1 week ago
Activity icon
issue

barryvdh issue comment magento/magento2

barryvdh
barryvdh

Add SMTP configuration + transport options

Description (*)

This adds the SMTP Transport from Laminas, to configure external SMTP with authentication.

image

Fixed Issues (if relevant)

Fixes #26104

  1. Fixes magento/magento2#<issue_number>

Manual testing scenarios (*)

Create an SMTP account somewhere (Sendgrid, Mailgun, Mailtrap etc). Go to System -> Mail Configuration and fill the details Send any email (eg Customer Password reset) See it works

Questions or comments

  • The XML Path constants are repeated a bit, perhaps it would be better to create a prefix path and call $this->getConfig('host')
  • I disabled cram-md5 because it requires an external package. We could allow it and add a note to require it yourself if wanted.

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds are green)
barryvdh
barryvdh
Sep
9
1 week ago
Activity icon
published release Fix SSL config

barryvdh in fruitcake/magento2-email-advanced-config create published release Fix SSL config

createdAt 1 week ago
Activity icon
issue

barryvdh issue comment barryvdh/laravel-debugbar

barryvdh
barryvdh

Argument 1 passed to Barryvdh\Debugbar\DataCollector\CacheCollector::subscribe() must be an instance of Illuminate\Events\Dispatcher, instance of October\Rain\Events\Dispatcher given

Hello,

problem showed up when i've made a first step to create new plugin with rainlab/page-builder plugin. I had one plugin made the same way few days ago, now i wanted to make new one.... so after filling basic information to create plugin form and after click on "Create" button thix exception shows:

image same error shows on every page, both frontend and backend.

after searching for a problem, i've decidec to delete all *.json files in storage/debugbar, couse i've found they got > 600MB. Not knowing the business logic of debugbar, i thought it will help me force trought this issue. But it won't :/

when APP_DEBUG is set to FALSE, everythings goes and works fine. Enabling APP_DEBUG shows exception again.

how to make it work's again? i've got no ideas...

barryvdh
barryvdh

I should probably typehint a contract there.

Activity icon
issue

barryvdh issue comment magento/magento2

barryvdh
barryvdh

Add SMTP configuration + transport options

Description (*)

This adds the SMTP Transport from Laminas, to configure external SMTP with authentication.

image

Fixed Issues (if relevant)

Fixes #26104

  1. Fixes magento/magento2#<issue_number>

Manual testing scenarios (*)

Create an SMTP account somewhere (Sendgrid, Mailgun, Mailtrap etc). Go to System -> Mail Configuration and fill the details Send any email (eg Customer Password reset) See it works

Questions or comments

  • The XML Path constants are repeated a bit, perhaps it would be better to create a prefix path and call $this->getConfig('host')
  • I disabled cram-md5 because it requires an external package. We could allow it and add a note to require it yourself if wanted.

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds are green)
barryvdh
barryvdh
push

barryvdh push barryvdh/magento2

barryvdh
barryvdh

Use method to getTransport()

commit sha: 67368530cf011f0f7447737abb4b3d4f91fa88d3

push time in 1 week ago
open pull request

barryvdh wants to merge magento/magento2

barryvdh
barryvdh

Add SMTP configuration + transport options

Description (*)

This adds the SMTP Transport from Laminas, to configure external SMTP with authentication.

image

Fixed Issues (if relevant)

Fixes #26104

  1. Fixes magento/magento2#<issue_number>

Manual testing scenarios (*)

Create an SMTP account somewhere (Sendgrid, Mailgun, Mailtrap etc). Go to System -> Mail Configuration and fill the details Send any email (eg Customer Password reset) See it works

Questions or comments

  • The XML Path constants are repeated a bit, perhaps it would be better to create a prefix path and call $this->getConfig('host')
  • I disabled cram-md5 because it requires an external package. We could allow it and add a note to require it yourself if wanted.

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds are green)
barryvdh
barryvdh

Agreed, I tried to keep close to the original. So a public function getTransport() which does just this, and use that in the email?

pull request

barryvdh merge to magento/magento2

barryvdh
barryvdh

Add SMTP configuration + transport options

Description (*)

This adds the SMTP Transport from Laminas, to configure external SMTP with authentication.

image

Fixed Issues (if relevant)

Fixes #26104

  1. Fixes magento/magento2#<issue_number>

Manual testing scenarios (*)

Create an SMTP account somewhere (Sendgrid, Mailgun, Mailtrap etc). Go to System -> Mail Configuration and fill the details Send any email (eg Customer Password reset) See it works

Questions or comments

  • The XML Path constants are repeated a bit, perhaps it would be better to create a prefix path and call $this->getConfig('host')
  • I disabled cram-md5 because it requires an external package. We could allow it and add a note to require it yourself if wanted.

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds are green)
Sep
8
1 week ago
Activity icon
issue

barryvdh issue comment magento/magento2

barryvdh
barryvdh

Add SMTP configuration + transport options

Description (*)

This adds the SMTP Transport from Laminas, to configure external SMTP with authentication.

image

Fixed Issues (if relevant)

Fixes #26104

  1. Fixes magento/magento2#<issue_number>

Manual testing scenarios (*)

Create an SMTP account somewhere (Sendgrid, Mailgun, Mailtrap etc). Go to System -> Mail Configuration and fill the details Send any email (eg Customer Password reset) See it works

Questions or comments

  • The XML Path constants are repeated a bit, perhaps it would be better to create a prefix path and call $this->getConfig('host')
  • I disabled cram-md5 because it requires an external package. We could allow it and add a note to require it yourself if wanted.

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds are green)
barryvdh
barryvdh

Thank you for the review. I've updated the phpdocs.

Activity icon
issue

barryvdh issue comment barryvdh/laravel-debugbar

barryvdh
barryvdh

Request watcher

So basically with the new Http Events, we can do something similar to https://github.com/laravel/telescope/pull/1073 Maybe we can combine it with https://github.com/hannesvdvreken/guzzle-debugbar to provide a base request logger and just a method to wrap Guzzle Clients manually (eg debugbar()->trackRequests($client))

barryvdh
barryvdh

It's probably cleanest to extend the Guzzle client to use the Laravel events (as the example above does) and then just hook into those requests. That would work for the HttpClient from Laravel out of the box, and doesn't require Debugbar specific handlers for Guzzle.

Sep
7
1 week ago
Activity icon
issue

barryvdh issue comment magento/magento2

barryvdh
barryvdh

Add SMTP configuration + transport options

Description (*)

This adds the SMTP Transport from Laminas, to configure external SMTP with authentication.

image

Fixed Issues (if relevant)

Fixes #26104

  1. Fixes magento/magento2#<issue_number>

Manual testing scenarios (*)

Create an SMTP account somewhere (Sendgrid, Mailgun, Mailtrap etc). Go to System -> Mail Configuration and fill the details Send any email (eg Customer Password reset) See it works

Questions or comments

  • The XML Path constants are repeated a bit, perhaps it would be better to create a prefix path and call $this->getConfig('host')
  • I disabled cram-md5 because it requires an external package. We could allow it and add a note to require it yourself if wanted.

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds are green)
barryvdh
barryvdh

But isn't the config path the same as before?

Aug
31
2 weeks ago
push

barryvdh push thephpleague/omnipay-braintree

barryvdh
barryvdh

Fix bug in d947113 where $items was not defined (#68)

Co-authored-by: Tim Everts timeverts@users.noreply.github.com

commit sha: fef291e3018515bdd6dcc447d6de5e24dda990e1

push time in 2 weeks ago
pull request

barryvdh pull request thephpleague/omnipay-braintree

barryvdh
barryvdh

Fix bug in d947113 where `$items` is not defined

Resolves #67

This fixes a critical bug introduced by d947113 which caused an Undefined variable $items to be output from line 442 of src/Message/AbstractRequest.php.

https://github.com/thephpleague/omnipay-braintree/blob/d9471135a2837476687ad7f24e8656c92ce64088/src/Message/AbstractRequest.php#L438-L442

Activity icon
issue

barryvdh issue thephpleague/omnipay-braintree

barryvdh
barryvdh

Undefined variable $items

Looks like a bug in the code here. I am having trouble submitting line items to Braintree and getting an Undefined variable $items error.

https://github.com/thephpleague/omnipay-braintree/blob/2d49d595ce684b7c2ea3a26bd1dd45f13c77f030/src/Message/AbstractRequest.php#L442

Changing the if statement above it to

if (!$items = $this->getItems()) {

seems to fix the issue.

Activity icon
issue

barryvdh issue comment thephpleague/omnipay-braintree

barryvdh
barryvdh

Undefined variable $items

Looks like a bug in the code here. I am having trouble submitting line items to Braintree and getting an Undefined variable $items error.

https://github.com/thephpleague/omnipay-braintree/blob/2d49d595ce684b7c2ea3a26bd1dd45f13c77f030/src/Message/AbstractRequest.php#L442

Changing the if statement above it to

if (!$items = $this->getItems()) {

seems to fix the issue.

barryvdh
barryvdh
Aug
26
3 weeks ago
Activity icon
issue

barryvdh issue fruitcake/laravel-cors

barryvdh
barryvdh

No 'Access-Control-Allow-Origin' header is present on the requested resource.

im using this boilerplate Apiato

postman request working and browser request working but axios request not working.

axios setup.

import axios from 'axios';

const api = axios.create({
    baseURL: 'http://api.apiato.test/v1',
    headers: {
        'Access-Control-Allow-Origin': '*',
        'Content-type': 'application/json',
    },
});

api.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';

let token = document.head.querySelector('meta[name="csrf-token"]') as HTMLMetaElement;

if (token) {
    api.defaults.headers.common['X-CSRF-TOKEN'] = token.content;
} else {
    console.error('CSRF token not found: https://laravel.com/docs/csrf#csrf-x-csrf-token');
}

export default api;

error.

Access to XMLHttpRequest at 'http://api.apiato.test/v1/users' from origin 'http://apiato.test' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.

app.js:1691 Uncaught (in promise) Error: Network Error
    at createError (app.js:1691)
    at XMLHttpRequest.handleError
Activity icon
issue

barryvdh issue comment fruitcake/laravel-cors

barryvdh
barryvdh

No 'Access-Control-Allow-Origin' header is present on the requested resource.

im using this boilerplate Apiato

postman request working and browser request working but axios request not working.

axios setup.

import axios from 'axios';

const api = axios.create({
    baseURL: 'http://api.apiato.test/v1',
    headers: {
        'Access-Control-Allow-Origin': '*',
        'Content-type': 'application/json',
    },
});

api.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';

let token = document.head.querySelector('meta[name="csrf-token"]') as HTMLMetaElement;

if (token) {
    api.defaults.headers.common['X-CSRF-TOKEN'] = token.content;
} else {
    console.error('CSRF token not found: https://laravel.com/docs/csrf#csrf-x-csrf-token');
}

export default api;

error.

Access to XMLHttpRequest at 'http://api.apiato.test/v1/users' from origin 'http://apiato.test' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.

app.js:1691 Uncaught (in promise) Error: Network Error
    at createError (app.js:1691)
    at XMLHttpRequest.handleError
Aug
25
3 weeks ago
Activity icon
issue

barryvdh issue comment fruitcake/laravel-telescope-toolbar

barryvdh
barryvdh

Add auto night theme

I added 'auto' option for the light theme option in config so it imports both of css files that styles light and dark mode so that toolbar should automatically detect if the user has requested a light or dark theme based on the operating system's or browser's settings.