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

Bug: helper current_url() return wrong protocol #3648

Closed
densoooo opened this issue Sep 16, 2020 · 0 comments · Fixed by #3649
Closed

Bug: helper current_url() return wrong protocol #3648

densoooo opened this issue Sep 16, 2020 · 0 comments · Fixed by #3649
Labels
bug Verified issues on the current code behavior or pull requests that will fix them

Comments

@densoooo
Copy link

Describe the bug
Currently I have configuration for my web on the .env like this

app.baseURL = 'http://starter.test'
app.forceGlobalSecureRequests = true

On every page, lets say https://starter.test/admin/usercontroller/test for this example, using base_url(uri_string()) I can get the expected https://starter.test/admin/usercontroller/test but using current_url() I'm getting http://starter.test/admin/usercontroller/test even though on documentation it says

Calling this function is the same as doing this:

base_url(uri_string());

https://codeigniter.com/user_guide/helpers/url_helper.html?highlight=current_url#current_url

CodeIgniter 4 version
v4.0.4

Affected module(s)
URL Helper

Expected behavior, and steps to reproduce if appropriate
Calling current_url() should return matched url protocol with currently opened page

Context

  • OS: Windows 10
  • Web server Apache 2.4.35
  • PHP version 7.4.5
@densoooo densoooo added the bug Verified issues on the current code behavior or pull requests that will fix them label Sep 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Verified issues on the current code behavior or pull requests that will fix them
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant