This file contains 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
<!DOCTYPE html> | |
<html> | |
<body> | |
<!-- | |
This sample page adds a link to launch the cloudsponge widget only if the user clicks. | |
This will reduce the load time of your page and is especially useful if the primary | |
purpose of the page is not importing address books. | |
The page only depends on the Cloudsponge Widget script. | |
--> |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<!-- | |
Include the script anywhere on your page, usually in the head | |
(don't forget to replace `localhost-only` with your own CloudSponge Widget Key) | |
--> | |
<script src="//api.cloudsponge.com/widget/localhost-only.js"></script> | |
<script> | |
// extra widget options: |
This file contains 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
# Cloudsponge proxy reference | |
# Python reference implementation using django | |
# | |
# contributed by Dannie Chu of foodoro.com | |
from django.http import HttpResponse, HttpResponseRedirect | |
# from fdr.logging.logger import Logger | |
from urllib2 import HTTPRedirectHandler | |
import urllib | |
import urllib2 |
This file contains 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
<div>A new bit of data added.</div> |
This file contains 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
<!DOCTYPE HTML> | |
<html> | |
<body> | |
<h2>IFrame Import Child Page</h2> | |
<!-- | |
Create a custom link to start the import process | |
--> | |
<a href="#" onclick="return parent.cloudsponge.launch();"> | |
Add from Address Book |
This file contains 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
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="CloudSpongeProxy._Default" %> | |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head runat="server"> | |
<title></title> | |
</head> | |
<body> | |
<asp:Label ID="lblContent" runat="server"></asp:Label> |
This file contains 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
require 'cloudsponge' | |
def cloudsponge_proxy | |
url = Cloudsponge::URL_BASE + 'auth?' + request.query_string | |
response = Cloudsponge::Utility::get_url(url) | |
if response.is_a?(Net::HTTPRedirection) | |
redirect_to response["location"] | |
else | |
render :text => response.try(:body) |
This file contains 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
location /proxy/ { | |
proxy_pass https://api.cloudsponge.com/auth; | |
} |
This file contains 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
ProxyPass /foo http://foo.example.com/bar | |
ProxyPassReverse /foo http://foo.example.com/bar |
OlderNewer