Plugin.cs 673 B

1234567891011121314151617181920212223
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Collections.Specialized;
  4. using System.Linq;
  5. using System.Text;
  6. namespace CORSHeaderPlugin
  7. {
  8. public class Plugin
  9. {
  10. public NameValueCollection AddResponseHeaders()
  11. {
  12. return new NameValueCollection()
  13. {
  14. {"Access-Control-Allow-Origin","*"},
  15. {"Access-Control-Allow-Methods","POST, GET, OPTIONS"},
  16. {"Access-Control-Allow-Headers","X-Requested-With, Content-Type"},
  17. {"Access-Control-Max-Age","1728000"},
  18. };
  19. }
  20. }
  21. }