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

I can access site but login with Breeze fail? #10

Closed
zenepay opened this issue Jun 1, 2023 · 1 comment
Closed

I can access site but login with Breeze fail? #10

zenepay opened this issue Jun 1, 2023 · 1 comment

Comments

@zenepay
Copy link

zenepay commented Jun 1, 2023

After install this I can access the site with https://localhost, but trying to enter username password it always fail, while using http://localhost is working fine. What would it causes the issue? How should I fix this.
server {
listen 443 ssl default_server;
server_name ${SERVER_NAME};

# Self signed certificates
# Don't use them in a production server!
ssl_certificate     /etc/nginx/certs/server.pem;
ssl_certificate_key /etc/nginx/certs/server.key;

location / {
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header Host $host;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_pass	http://${APP_SERVICE}:8000;
}

}

@zenepay
Copy link
Author

zenepay commented Jun 2, 2023

I got it fixed now.
I need to add this in the AppServiceProvider.php, since Laravel always forward to http:// without this one. Then the session was not save because it was 301 redirect
public function boot()
{
//Zen add
\Illuminate\Support\Facades\URL::forceScheme('https');
}

@ryoluo ryoluo closed this as completed Jun 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants