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

Shared file URLs use default S3 hostname #204

Open
paulschreiber opened this issue Oct 3, 2022 · 3 comments
Open

Shared file URLs use default S3 hostname #204

paulschreiber opened this issue Oct 3, 2022 · 3 comments
Assignees

Comments

@paulschreiber
Copy link
Member

Description

The dataEntries data returned from the API uses default S3 hostname instead of xyz.terraso.org.

Steps To Reproduce

  1. Go to URL a group with files in it, i.e. https://app.staging.terraso.org/groups/academic-research-test
  2. Click the download button beside a file

Expected behavior

"dataEntries": {
    "edges": [
        {
            "node": {
                "id": "fc380b23-a22f-451a-8d6b-6134bad27806",
                "name": "name name here2",
                "description": "222222 blah blah Good file description",
                "resourceType": "csv",
                "url": "https://files.staging.terraso.org/f3952a22-9328-4f09-8980-ba70a0b58a87/terraso-a11y-test_1.csv?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=xxxxxxx%2Fus-east-2%2Fs3%2Faws4_request&X-Amz-Date=20221003T193358Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Signature=xxxxxxx",

Actual behavior

"dataEntries": {
    "edges": [
        {
            "node": {
                "id": "fc380b23-a22f-451a-8d6b-6134bad27806",
                "name": "name name here2",
                "description": "222222 blah blah Good file description",
                "resourceType": "csv",
                "url": "https://s3.us-east-2.amazonaws.com/files.staging.terraso.org/f3952a22-9328-4f09-8980-ba70a0b58a87/terraso-a11y-test_1.csv?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=xxxxxxx%2Fus-east-2%2Fs3%2Faws4_request&X-Amz-Date=20221003T193358Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Signature=xxxxxxx",


@JeancarloBarrios JeancarloBarrios self-assigned this Feb 12, 2023
@JeancarloBarrios
Copy link
Contributor

JeancarloBarrios commented Feb 12, 2023

Do we envision the solution using a proxy or a CloudFront custom url?

@paulschreiber
Copy link
Member Author

No. We are already using Cloudflare to proxy things.

@paulschreiber
Copy link
Member Author

Possible fix: jschneier/django-storages#839 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Todo
3 participants