Web protection

{#if editor.dirty}

Save or discard changes before choosing another hostname.

{/if}
{#if hostnameError}

{hostnames === null ? 'Could not load hostnames. Refresh to retry.' : 'Using the previous hostname list.'}

{:else if hostnames !== null && !choices.length}

Add a tunnel to register a hostname.

{/if} {#if hostname && !registered && hostnames !== null}

This hostname is no longer registered to this client.

{/if} {#if readError} {/if} {#if editor.stale} {/if} {#if editor.initialized}
{ if (registered) return editor.submit(event); event.preventDefault(); }} class="mt-4" aria-label={`Protection for ${hostname}`}>
Hostname policy

Rule exceptions

{#if draft.exclusions.length}
{#each draft.exclusions as item, index}
{ editor.form.setFieldValue(`exclusions[${index}].rule`, event.currentTarget.value); editor.edited(); }} inputmode="numeric" pattern={'[0-9]{6}'} maxlength="6" required placeholder="941100" title="Enter the six-digit rule ID from the blocked request." aria-label={`Rule ID for exception ${index + 1}`} />
{ editor.form.setFieldValue(`exclusions[${index}].path`, event.currentTarget.value); editor.edited(); }} autocomplete="off" autocapitalize="none" spellcheck={false} placeholder="/api/save" aria-describedby="waf-path-help" />
{/each}

Use the escaped path without a query string. An empty path applies to every path on this hostname.

{:else}

No rule exceptions.

{/if}
{#if editor.dirty && !editor.stale}{/if} {#if editor.dirty}Unsaved changes{/if}
{:else if editor.query.isFetching}
Loading hostname protection…
{/if}