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

Incorrect URL Generation with Custom APP_URL #52191

Closed
acecx opened this issue Jul 19, 2024 · 3 comments
Closed

Incorrect URL Generation with Custom APP_URL #52191

acecx opened this issue Jul 19, 2024 · 3 comments

Comments

@acecx
Copy link

acecx commented Jul 19, 2024

Laravel Version

11.16.0

PHP Version

8.3.9

Database Driver & Version

No response

Description

Description:

When using the URL https://abcde-psdfxxx-8000.app.cloudstudio.work/ as the APP_URL, the default framework page generates incorrect URLs. For example, the {{ route('register') }} directive results in the path https://8000.app.cloudstudio.work/register. Similarly, all asset URLs are also generated with this incorrect host header.

Steps To Reproduce

1、Set APP_URL in the .env file to https://abcde-psdfxxx-8000.app.cloudstudio.work/.
2、Start the Laravel development server using php artisan serve.
3、Access the application at https://abcde-psdfxxx-8000.app.cloudstudio.work/.
4、Check the generated URLs for routes and assets on the default framework page.

Copy link

Thank you for reporting this issue!

As Laravel is an open source project, we rely on the community to help us diagnose and fix issues as it is not possible to research and fix every issue reported to us via GitHub.

If possible, please make a pull request fixing the issue you have described, along with corresponding tests. All pull requests are promptly reviewed by the Laravel team.

Thank you!

@driesvints
Copy link
Member

Did you put the url between quotes? What happens if you try APP_URL="https://abcde-psdfxxx-8000.app.cloudstudio.work" (also notice no trailing slash)

@driesvints driesvints changed the title Bug Report: Incorrect URL Generation with Custom APP_URL Incorrect URL Generation with Custom APP_URL Jul 22, 2024
@driesvints
Copy link
Member

Closing this issue because it's inactive, already solved, old or not relevant anymore. Feel to open up a new issue if you're still experiencing this.

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

No branches or pull requests

3 participants