8000 feat(worker): add static-key to keep the same public url for serve static files (close #3657) by bnjjj · Pull Request #3670 · ovh/cds · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

feat(worker): add static-key to keep the same public url for serve static files (close #3657) #3670

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

Merged
merged 3 commits into from
Dec 3, 2018

Conversation

bnjjj
Copy link
Contributor
@bnjjj bnjjj commented Dec 3, 2018

Signed-off-by: Benjamin Coenen benjamin.coenen@corp.ovh.com

  1. Description
  2. Related issues
    close Serve Static Files with a fix url #3657
  3. About tests
  4. Mentions

@ovh/cds

…atic files (close #3657)

Signed-off-by: Benjamin Coenen <benjamin.coenen@corp.ovh.com>
Copy link
Member
@yesnault yesnault left a comment

Choose a reason for hiding this comment

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

missing doc about this coooool feature :)

container := base64.RawURLEncoding.EncodeToString([]byte(fmt.Sprintf("%d-%s", staticfile.NodeJobRunID, url.PathEscape(staticfile.Name))))
var container string
if staticfile.StaticKey != "" {
container = base64.RawURLEncoding.EncodeToString([]byte(fmt.Sprintf("%d-%d-%s", staticfile.WorkflowID, staticfile.StaticKey, url.PathEscape(staticfile.Name))))

Choose a reason for hiding this comment

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

Sprintf format %d has arg staticfile.StaticKey of wrong type string (from govet)

…atic files (close #3657)

Signed-off-by: Benjamin Coenen <benjamin.coenen@corp.ovh.com>
…atic files (close #3657)

Signed-off-by: Benjamin Coenen <benjamin.coenen@corp.ovh.com>
Copy link
Member
@fsamin fsamin left a comment

Choose a reason for hiding this comment

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

what does the URL look like ?

@yesnault yesnault merged commit 0154f0f into master Dec 3, 2018
@bnjjj bnjjj deleted the feat_3657 branch January 3, 2019 09:12
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.

Serve Static Files with a fix url
6 participants
0