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

add spa fileserver to the web service #3109

Merged
merged 3 commits into from
Feb 23, 2022
Merged

add spa fileserver to the web service #3109

merged 3 commits into from
Feb 23, 2022

Conversation

fschade
Copy link
Contributor

@fschade fschade commented Feb 3, 2022

Description

Adding a custom fileServer implementation was neede due the requirement of having nice and clean URLs without a hash http://foo.tld/#foo/bar. To get a more detailed insight please read 6277.

The implementation behaves similar to the nginx try_files setting and always falls back to the index.html file if a requested resource is not found.

It also injects a base tag into the html files which is needed for web to sniff what mode to use (hash or history).
We cannot get rid of the hash mode for now because we still use it in oc10 and maybe in custom deployments.

A nice side effect is that we're now able to re-enable cache headers for the web service.

Related Issue

Motivation and Context

... nice URLS

How Has This Been Tested?

  • we acceptance tests

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests only (no source changes)

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:

Copy link
Contributor

@C0rby C0rby left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just small nitpicks

changelog/unreleased/enhancement-web-spa-fileserver.md Outdated Show resolved Hide resolved
web/pkg/assets/server.go Outdated Show resolved Hide resolved
@fschade
Copy link
Contributor Author

fschade commented Feb 3, 2022

Please do not merge till owncloud/web#6363 is merged

@butonic butonic marked this pull request as draft February 8, 2022 13:25
@butonic
Copy link
Member

butonic commented Feb 8, 2022

converted to draft until owncloud/web#6363 is merged, so we don't accidentially merge this

@fschade fschade marked this pull request as ready for review February 22, 2022 15:39
@ownclouders
Copy link
Contributor

💥 Acceptance test Core-API-Tests-ocis-storage-5 failed. Further test are cancelled...

@sonarcloud
Copy link

sonarcloud bot commented Feb 23, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@fschade fschade merged commit f519b49 into master Feb 23, 2022
@delete-merged-branch delete-merged-branch bot deleted the spa-filesystem branch February 23, 2022 18:31
ownclouders pushed a commit that referenced this pull request Feb 23, 2022
Author: Florian Schade <f.schade@icloud.com>
Date:   Wed Feb 23 19:31:24 2022 +0100

    add spa fileserver to the web service (#3109)

    * add spa fileserver to the web service
ownclouders pushed a commit that referenced this pull request Feb 23, 2022
Author: Florian Schade <f.schade@icloud.com>
Date:   Wed Feb 23 19:31:24 2022 +0100

    add spa fileserver to the web service (#3109)

    * add spa fileserver to the web service
@micbar micbar mentioned this pull request Mar 3, 2022
26 tasks
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.

URL - VUE router history mode (oCIS only) Re-enable static web assets caching
4 participants