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

Check for prefix in getCorrectUrl() #38

Open
tdicks opened this issue Aug 18, 2016 · 0 comments
Open

Check for prefix in getCorrectUrl() #38

tdicks opened this issue Aug 18, 2016 · 0 comments

Comments

@tdicks
Copy link

tdicks commented Aug 18, 2016

When the Laravel app is hosted at a subdirectory on the webserver and no prefix is set, the returned URL has a / prepended, forcing the URL to become absolute.

Line 85:

            getCorrectUrl: function (uri) {
                    var url = this.prefix + '/' + uri.replace(/^\/?/, '');

I changed to:

            getCorrectUrl: function (uri) {
                if( this.prefix != "")
                    var url = this.prefix + '/' + uri.replace(/^\/?/, '');
                else
                    var url = uri.replace(/^\/?/, '');

I'm certain that can be implemented better but it resolved the problem for me.

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

1 participant