This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.text.SimpleDateFormat; | |
import java.util.Date; | |
import java.util.HashMap; | |
import java.util.Map; | |
import javax.jcr.Session; | |
import javax.servlet.http.HttpServletRequest; | |
import javax.servlet.http.HttpServletResponse; | |
import org.apache.commons.lang3.StringUtils; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Refer the original script - https://blog.cloudflare.com/edge-side-includes-with-cloudflare-workers/ | |
//Modified the script - to include the main request headers while invoking the ESI resources | |
//- Support ESI source path with complete source URL, fetch the hostname and proptocol from original request | |
addEventListener("fetch", event => { | |
event.respondWith(fetchAndStream(event.request)) | |
event.passThroughOnException() | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import javax.servlet.http.HttpServletRequest; | |
import org.apache.jackrabbit.api.security.user.User; | |
import org.osgi.service.component.annotations.Component; | |
import com.adobe.granite.oauth.server.Scope; | |
import com.adobe.granite.oauth.server.ScopeWithPrivileges; | |
@Component(service=Scope.class) | |
public class DAMWriteScope implements ScopeWithPrivileges{ | |
private static final String DAM_RESOURCE_URI="/content/dam/digital"; | |
private static final String DAM_RESOURCE_WRITE_SCOPE_NAME="dam_write"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import javax.servlet.http.HttpServletRequest; | |
import org.apache.jackrabbit.api.security.user.User; | |
import org.osgi.service.component.annotations.Component; | |
import com.adobe.granite.oauth.server.Scope; | |
import com.adobe.granite.oauth.server.ScopeWithPrivileges; | |
@Component(service=Scope.class) | |
public class DAMReadScope implements ScopeWithPrivileges{ | |
private static final String DAM_RESOURCE_URI="/content/dam/digital"; | |
private static final String DAM_RESOURCE_READ_SCOPE_NAME="dam_read"; |
NewerOlder