Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ErrorException thrown with message "Undefined index: HTTP_ORIGIN" #1

Closed
bluesn4rfer opened this issue Jul 25, 2022 · 3 comments
Closed

Comments

@bluesn4rfer
Copy link
Contributor

ISSUE:
After creating a default leaf mvc project, then attempting to view the project the user receives a notice exception.

EXCEPTION DETAILS
Leaf\Exceptions\ErrorException thrown with message "Undefined index: HTTP_ORIGIN"

Stacktrace:
#6 Leaf\Exceptions\ErrorException in vendor/leafs/cors/src/Cors.php:129
#5 Leaf\Exception\Run:handleError in vendor/leafs/cors/src/Cors.php:129
#4 Leaf\Http\Cors:isOriginAllowed in vendor/leafs/cors/src/Cors.php:68
#3 Leaf\Http\Cors:configureOrigin in vendor/leafs/cors/src/Cors.php:33
#2 Leaf\Http\Cors:config in vendor/leafs/leaf/src/App.php:385
#1 Leaf\App:cors in public/index.php:100
#0 require_once in index.php:24

STEPS TO REPRODUCE:

  1. Create a Leaf MVC project with the command "composer create-project leafs/mvc v3.x-dev"
  2. Start project with "php leaf serve"
  3. View the project in Google Chrome, the user is shown a notice exception.

NoticeException

@mychidarko
Copy link
Member

Hi @bluesn4rfer. Which chrome version are you using pls?

@UweKeim
Copy link

UweKeim commented Jul 25, 2022

Getting the same error, too.

My environment:

  • Windows 11, German, 64-bit
  • Google Chrome Version 103.0.5060.134
  • Running newly created project it inside Visual Studio through PHP Tools for Visual Studio

@mychidarko
Copy link
Member

Thanks @UweKeim

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Published
Development

No branches or pull requests

3 participants