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 solid:proxy to Solid Terms #94

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion solid-terms.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -215,9 +215,16 @@ solid:privateTypeIndex
dc:issued "2018-01-24"^^xsd:date ;
rdfs:comment "Points to an unlisted type index resource."@en ;
rdfs:range solid:UnlistedDocument ;
rdfs:isDefinedBy <http://www.w3.org/ns/solid/terms#> ;
rdfs:label "private type index"@en .

solid:proxy
a rdf:Property ;
dc:issue "2024-10-10"^^xsd:date ;
rdfs:comment """A proxy endpoint for applications to use. The value of the property is intended to be used as the base URL for the request, e.g., the proxy as literal: `https://example.org/proxy?uri=` would be used to request `https://example.net/profile/card#me` as `https://example.org/proxy?uri=https://example.net/profile/card%23me`"""@en ;
Copy link
Member Author

@csarven csarven Oct 11, 2024

Choose a reason for hiding this comment

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

Alternative where the path is irrelevant, and what's most important is the query parameter "proxy" for servers to consider. It should not matter for the application since they'd essentially just concat.

Suggested change
rdfs:comment """A proxy endpoint for applications to use. The value of the property is intended to be used as the base URL for the request, e.g., the proxy as literal: `https://example.org/proxy?uri=` would be used to request `https://example.net/profile/card#me` as `https://example.org/proxy?uri=https://example.net/profile/card%23me`"""@en ;
rdfs:comment """A proxy endpoint for applications to use. The value of this property is intended to be used as the base URL for requests, following the URI Template: `{+path}{?proxy}`. For example, the proxy `https://example.org/foo?proxy=` can be used to fetch `https://example.net/profile/card` by making an HTTP request to `https://example.org/foo?proxy=https://example.net/profile/card`."""@en ;

I don't have a strong opinion on this besides it being dead simple for applications, essentially concatenating the resource they want to fetch to the proxy URL.

What I don't like about the above is that existing servers with dedicated resource and accepting requests with a query parameter, e.g., /proxy?uri= will need to be updated. So, prefer to stick to what's currently deployed. In that case we need the URI Template and the example in the rdfs:comment be along these lines:

Suggested change
rdfs:comment """A proxy endpoint for applications to use. The value of the property is intended to be used as the base URL for the request, e.g., the proxy as literal: `https://example.org/proxy?uri=` would be used to request `https://example.net/profile/card#me` as `https://example.org/proxy?uri=https://example.net/profile/card%23me`"""@en ;
rdfs:comment """A proxy endpoint for applications to use. The value of this property is intended to be used as the base URL for requests, following the URI Template: `/proxy{?uri}`. For example, the proxy `https://example.org/proxy?uri=` can be used to fetch `https://example.net/profile/card` by making an HTTP request to `https://example.org/proxy?uri=https://example.net/profile/card`."""@en ;

Copy link
Member

Choose a reason for hiding this comment

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

Those details should be in the relevant specification. This vocabulary term would then link to the relevant section of that specification.

Copy link

@mrkvon mrkvon Oct 14, 2024

Choose a reason for hiding this comment

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

It's not clear to me whether we should provide an URL-encoded uri (e.g. using encodeURIComponent(originalURI)), or not. This description seems to suggest non-encoded URIs, but I guess they may cause troubles.

Personally, I find the version before changes most clear; I guess that's a matter of personal preference though.

rdfs:label "proxy"@en ;
rdfs:isDefinedBy <http://www.w3.org/ns/solid/terms#> ;
rdfs:range rdfs:Literal .

solid:publicTypeIndex
a rdf:Property ;
dc:issued "2018-01-24"^^xsd:date ;
Expand Down