Symmetries corresponding to local transformations of the fundamental fields that leave the action invariant give rise to (invertible) topological defects, which obey group-like fusion rules. One can construct more general (codimension-one) topological defects by specifying a map between gauge-invariant operators from one side of the defect and such operators on the other side. In this work, we apply such construction to Maxwell theory in four dimensions and to the free compact scalar theory in two dimensions. In the case of Maxwell theory, we show that a topological defect that mixes the field strength F and its Hodge dual ⋆F can be at most an SO(2) rotation. For rational values of the bulk coupling and the θ-angle we find an explicit defect Lagrangian that realizes values of the SO(2) angle φ such that cos φ is also rational. We further determine the action of such defects on Wilson and ’t Hooft lines and show that they are in general non-invertible. We repeat the analysis for the free compact scalar ϕ in two dimensions. In this case we find only four discrete maps: the trivial one, a ℤ2 map dϕ → −dϕ, a 𝒯-duality-like map dϕ → i ⋆ dϕ, and the product of the last two.