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

Angular-Cli does not serve type:'HEAD' #309

Closed
2 tasks done
JoeyWasHere opened this issue Mar 28, 2018 · 1 comment
Closed
2 tasks done

Angular-Cli does not serve type:'HEAD' #309

JoeyWasHere opened this issue Mar 28, 2018 · 1 comment

Comments

@JoeyWasHere
Copy link
Contributor

I use the following server-side connector (check one):

  • ASP.NET Core connector by sinanbozkus

My familiarity with the project is as follows (check one):

  • I have used the project extensively, but have not contributed previously.

Angular-Cli does not serve type:'HEAD' by default in development. This change introduced a small new bug for those that use it.

angular/angular-cli#5170
Current:

	// Test if a given url exists
	var file_exists = function(url) {
		return $.ajax({
			type: 'HEAD',
			url: url
		});
	};

Previously working in 2.7.0:

        // Test if a given url exists
        var file_exists = function(url) {
            return $.ajax({
                type: 'GET',
                url: url
            });
        };

@psolom
Copy link
Owner

psolom commented Mar 28, 2018

It's not appropriate to use GET request just to check whether file exists. JS script code will stay with HEAD request. Try to modify the middleware to make it accept HEAD as discribed in webpack/webpack-dev-server#924 (comment)

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

2 participants