Skip to content

Instantly share code, notes, and snippets.

Avatar

Piotr Roszatycki dex4er

View GitHub Profile
View middleware.py
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):
View mailbody.pl
#!/usr/bin/env perl
use strict;
use warnings;
use Mail::Message;
use Mail::Message::Convert::HtmlFormatText;
my $af = Mail::Message::Convert::HtmlFormatText->new;