Skip to content

Enable CORS for webserver #537

Open
Open
@MathiasVDA

Description

@MathiasVDA

Hello,

I think CORS (Cross-Origin Resource Sharing) is disabled by default for the sparql-anything webserver? Although Jena Fuseki webserver does activate it by default. I can't find a way to activate it in sparql-anything. Is this possible?

I'm no expert in this but I'm guessing it's just setting a flag somewhere:
https://jena.apache.org/documentation/javadoc/fuseki2-main/org.apache.jena.fuseki.main/org/apache/jena/fuseki/main/FusekiServer.Builder.html#enableCors(boolean)

Maybe this helps:
https://github.com/apache/jena/blob/8248e0f3675790b69ac934f483b2753ad9a2b860/jena-fuseki2/jena-fuseki-main/src/main/java/org/apache/jena/fuseki/main/cmds/FusekiMain.java#L94

I have sparql-anything running on a webserver and I tried to use my own yasgui (that has a geo tab) to work with the endpoint but get "failed to fetch". cors related errors.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions