Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Page Rules Implementation #35

Open
wants to merge 1 commit into
base: 2.0
Choose a base branch
from

Conversation

zanderwar
Copy link
Contributor

@zanderwar zanderwar commented Dec 27, 2016

This PR introduces Page Rule handling.

Primarily intended to ensure that you have Page Rules setup correctly for any SilverStripe project, you can also control your page rules. You can enable or disable page rules all without leaving the SilverStripe Administration Panel

Other module developers will be able to suggest recommended page rules via a YAML file in their _config folder

While the API provides everything you could need to create and edit page rules, it's outside the scope of this project and I implore others to create extensions, submit a PR if you want to see it.

@zanderwar
Copy link
Contributor Author

zanderwar commented Dec 29, 2016

Suggested Page Rules Markup for Other Developers

\Steadlane\CloudFlare\CloudFlare:
  suggested_page_rules:
    - name: 'Disable Security Cache'
      purpose: 'Prevents caching of the login page and other functionality'
      owner: 'My Module Name'
      mask: "*{server_name}{base_url}/security/*"
      actions:
        - id: cache_level
          value: bypass
        - id: browser_check
          value: on
        - id: security_level
          value: high

Notes:

name must be unique for it to be referenced, I felt like enough was already required without getting the developer to specify a unique slug for it.

owner must reference the package and be consistent across all suggestions

mask can be wildcarded and {server_name} and {base_url} will be parsed before any API calls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant