Skip to content

Instantly share code, notes, and snippets.

View dex4er's full-sized avatar

Piotr Roszatycki dex4er

  • Berlin, Germany
View GitHub Profile
from django import http
from django.conf import settings
XS_SHARING_ALLOWED_ORIGINS = getattr(settings, 'XS_SHARING_ALLOWED_ORIGINS', '*')
XS_SHARING_ALLOWED_METHODS = getattr(settings, 'XS_SHARING_ALLOWED_METHODS', ['POST', 'GET', 'OPTIONS', 'PUT', 'DELETE'])
XS_SHARING_ALLOWED_HEADERS = getattr(settings, 'XS_SHARING_ALLOWED_HEADERS', ['Content-Type', '*'])
XS_SHARING_ALLOWED_CREDENTIALS = getattr(settings, 'XS_SHARING_ALLOWED_CREDENTIALS', 'true')
class XsSharing(object):
#!/usr/bin/env perl
use strict;
use warnings;
use Mail::Message;
use Mail::Message::Convert::HtmlFormatText;
my $af = Mail::Message::Convert::HtmlFormatText->new;