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

Return a json response when a incomplete url is requested #436

Merged
merged 2 commits into from
Oct 11, 2018

Conversation

philip-hunt
Copy link
Contributor

@philip-hunt philip-hunt commented Oct 5, 2018

@philip-hunt
Copy link
Contributor Author

The existing code determined if the url was 'incomplete' by checking to see if the request had a file extension. If not it assumed it was a directory. I've kept this existing functionality, but is this what we want? It would mean that the CDN would never return any files without an extension.

@jimlambie
Copy link
Contributor

@philip-hunt you raise an interesting question... we recently disabled the "jpg by default" feature so that we can effectively use CDN as a passthrough HTML cache. For example, configuring CDN to obtain assets from a remote source such as https://dadi.cloud/en/ would allow you to serve the entire website through CDN, caching HTML responses on the way and therefore serving the full site from the CDN cache.

This approach relies on being able to specify paths with no extension - however it's probably the case that there are no tests in the project for this functionality.

Let me add tests for this first, and we'll come back to this.

cc @eduardoboucas

@jimlambie jimlambie mentioned this pull request Oct 9, 2018
@jimlambie jimlambie merged commit 55754dc into develop Oct 11, 2018
@jimlambie jimlambie deleted the feature/406-incomplete-url-response branch October 11, 2018 08:53
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

Successfully merging this pull request may close these issues.

None yet

2 participants