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

Enable CORS for platform ? #432

Closed
ycoulon opened this issue Nov 11, 2016 · 5 comments
Closed

Enable CORS for platform ? #432

ycoulon opened this issue Nov 11, 2016 · 5 comments
Milestone

Comments

@ycoulon
Copy link

ycoulon commented Nov 11, 2016

Hi,

Is there any way to enable CORS for Alfresco from the SDK ? Platform jar or All In One ?

It would be usefull to work on Alfresco module and UI using the ADF.

@ohej
Copy link
Contributor

ohej commented Nov 17, 2016

We provide a JAR that contains a webfragment with CORS enabled, see here: https://artifacts.alfresco.com/nexus/#nexus-search;quick~enablecors

I haven't tested it out, but you should be able to add the module in as a dependency and it should work, i.e

<dependency>
  <groupId>org.alfresco</groupId>
  <artifactId>enablecors</artifactId>
  <version>1.0</version>
</dependency>

Let me know if this works or not

@ohej ohej added this to the 3.0.0 milestone Nov 17, 2016
@ycoulon
Copy link
Author

ycoulon commented Nov 17, 2016

Hi,
Thanks Ohej for the link.

Just need to add the following dependencies :

<dependency>
    <groupId>com.thetransactioncompany</groupId>
    <artifactId>cors-filter</artifactId>
    <version>2.5</version>
</dependency>

And it works.

@ycoulon ycoulon closed this as completed Nov 17, 2016
@kodermax
Copy link

How can I enable cors filter in SDK?

@luistrigueiros
Copy link

Hi,

I found that we need to include both the enablecors and the cors-filter dependencies in the SDK generated project the enablecors should just have a transitive dependency on cors-filter.

@covolution
Copy link

The Alfresco repository ships with cors-filter-2.5.jar so the enablecors dependency is purely for configuring the existing classes. You would need the cors-filter dependency if the cors-filter-2.5.jar isn't already in the the WEB-INF/lib.

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

No branches or pull requests

5 participants